12#define EAFNOSUPPORT EINVAL
26 s = socket(AF_INET,SOCK_STREAM,0);
37 s = socket(AF_INET6,SOCK_STREAM,0);
48 s = socket(AF_INET6,SOCK_STREAM,0);
50 if (errno == EINVAL || errno ==
EAFNOSUPPORT || errno ==
EPROTO || errno == EPROTONOSUPPORT)
51 s = socket(AF_INET,SOCK_STREAM,0);
62 return setsockopt(s,IPPROTO_TCP,1,&opt,
sizeof(opt));
int socket_tcpnodelay(int s)