socket->m_server = FALSE;
socket->m_stream = TRUE;
socket->m_gui_dependent = NULL;
- socket->m_blocking = FALSE;
+ socket->m_non_blocking = FALSE;
socket->m_timeout = 10*60*1000;
/* 10 minutes * 60 sec * 1000 millisec */
return GSOCK_IOERR;
}
- GSocket_SetNonBlocking(sck, sck->m_blocking);
+ GSocket_SetNonBlocking(sck, sck->m_non_blocking);
GSocket_SetTimeout(sck, sck->m_timeout);
return GSOCK_NOERROR;
return GSOCK_IOERR;
}
- GSocket_SetNonBlocking(sck, sck->m_blocking);
+ GSocket_SetNonBlocking(sck, sck->m_non_blocking);
GSocket_SetTimeout(sck, sck->m_timeout);
return GSOCK_NOERROR;
/* It is not a server */
sck->m_server = FALSE;
- GSocket_SetNonBlocking(sck, sck->m_blocking);
+ GSocket_SetNonBlocking(sck, sck->m_non_blocking);
GSocket_SetTimeout(sck, sck->m_timeout);
return GSOCK_NOERROR;
{
assert(socket != NULL);
- socket->m_blocking = non_block;
+ socket->m_non_blocking = non_block;
if (socket->m_fd != -1)
ioctl(socket->m_fd, FIONBIO, &non_block);
addr = &(((struct sockaddr_in *)address->m_addr)->sin_addr);
/* If it is a numeric host name, convert it now */
+#if defined(HAVE_INET_ATON)
if (inet_aton(hostname, addr) == 0) {
+#elif defined(HAVE_INET_ADDR)
+ /* Fix from Guillermo Rodriguez Garcia <guille@iies.es> */
+ if ( (addr->s_addr = inet_addr(hostname)) == -1 ) {
+#else
+ /* Use gethostbyname by default */
+ if (1) {
+#endif
struct in_addr *array_addr;
/* It is a real name, we solve it */