test IPV6 supporting

This commit is contained in:
zsx 2018-09-16 22:19:40 +08:00
parent f27af8b424
commit 75a4cbf1e2
2 changed files with 4 additions and 5 deletions

View File

@ -88,7 +88,7 @@ int main(int argc, char *argv[])
}
printf(">>>>>>connect all ok\r\n");
sleep(100);
sleep(1);
acl_vstream_fprintf(client, "%s", "line1\nline2\nline3\nline4\nline5\nline6\nline7\n");
while (1) {

View File

@ -186,7 +186,7 @@ ACL_SOCKET acl_inet_connect_ex(const char *addr, int blocking,
} else if (acl_valid_ipv4_hostaddr(buf, 0)) {
ptr = strrchr(buf, ACL_ADDR_SEP);
if (ptr == NULL)
ptr = strrchr(buf, '.');
ptr = strrchr(buf, ':');
}
if (ptr == NULL) {
@ -261,9 +261,8 @@ ACL_SOCKET acl_inet_connect_ex(const char *addr, int blocking,
}
if (sock == ACL_SOCKET_INVALID)
acl_msg_error("%s(%d) %s: connect error %s, addr=%s:%s",
__FILE__, __LINE__, myname,
acl_last_serror(), peer, port);
acl_msg_error("%s(%d) %s: connect error %s, addr=%s",
__FILE__, __LINE__, myname, acl_last_serror(), addr);
if (peer_res0)
freeaddrinfo(peer_res0);