return -1;
/* Set socket nonblocking. */
+#ifdef USE_WIN32API
+ u_long ioarg = 1;
+#else
int ioarg = 1;
+#endif
ioctl (sock, FIONBIO, &ioarg);
ioctl (scb->fd, FIONBIO, &ioarg);
- if (success_ainfo->ai_socktype == IPPROTO_TCP)
+ if (success_ainfo->ai_protocol == IPPROTO_TCP)
{
/* Disable Nagle algorithm. Needed in some cases. */
int tmp = 1;