int err;
Actual_Socket ret;
short localport;
+ int fl;
/*
* Create Socket structure.
a.sin_addr.s_addr = htonl(addr->address);
a.sin_port = htons((short) port);
#endif
- {
- int i = 1;
- ioctl(s, FIONBIO, &i);
- }
+
+ fl = fcntl(s, F_GETFL);
+ if (fl != -1)
+ fcntl(s, F_SETFL, fl | O_NONBLOCK);
if ((
#ifdef IPV6
if (s->writable)
try_send(s);
+ /*
+ * Update the select() status to correctly reflect whether or
+ * not we should be selecting for write.
+ */
+ uxsel_tell(s);
+
return bufchain_size(&s->output_data);
}
if (s->writable)
try_send(s);
+ /*
+ * Update the select() status to correctly reflect whether or
+ * not we should be selecting for write.
+ */
+ uxsel_tell(s);
+
return s->sending_oob;
}