mirror of
https://gitee.com/acl-dev/acl.git
synced 2024-12-12 11:55:13 +08:00
test IPV6 supporting
This commit is contained in:
parent
f27af8b424
commit
75a4cbf1e2
@ -88,7 +88,7 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
printf(">>>>>>connect all ok\r\n");
|
printf(">>>>>>connect all ok\r\n");
|
||||||
sleep(100);
|
sleep(1);
|
||||||
acl_vstream_fprintf(client, "%s", "line1\nline2\nline3\nline4\nline5\nline6\nline7\n");
|
acl_vstream_fprintf(client, "%s", "line1\nline2\nline3\nline4\nline5\nline6\nline7\n");
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
|
@ -186,7 +186,7 @@ ACL_SOCKET acl_inet_connect_ex(const char *addr, int blocking,
|
|||||||
} else if (acl_valid_ipv4_hostaddr(buf, 0)) {
|
} else if (acl_valid_ipv4_hostaddr(buf, 0)) {
|
||||||
ptr = strrchr(buf, ACL_ADDR_SEP);
|
ptr = strrchr(buf, ACL_ADDR_SEP);
|
||||||
if (ptr == NULL)
|
if (ptr == NULL)
|
||||||
ptr = strrchr(buf, '.');
|
ptr = strrchr(buf, ':');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ptr == NULL) {
|
if (ptr == NULL) {
|
||||||
@ -261,9 +261,8 @@ ACL_SOCKET acl_inet_connect_ex(const char *addr, int blocking,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (sock == ACL_SOCKET_INVALID)
|
if (sock == ACL_SOCKET_INVALID)
|
||||||
acl_msg_error("%s(%d) %s: connect error %s, addr=%s:%s",
|
acl_msg_error("%s(%d) %s: connect error %s, addr=%s",
|
||||||
__FILE__, __LINE__, myname,
|
__FILE__, __LINE__, myname, acl_last_serror(), addr);
|
||||||
acl_last_serror(), peer, port);
|
|
||||||
|
|
||||||
if (peer_res0)
|
if (peer_res0)
|
||||||
freeaddrinfo(peer_res0);
|
freeaddrinfo(peer_res0);
|
||||||
|
Loading…
Reference in New Issue
Block a user