/* We always have a stream here */
sck->m_stream = TRUE;
+ sck->m_server = TRUE;
/* Create the socket */
sck->m_fd = socket(sck->m_local->m_realfamily, SOCK_STREAM, 0);
DISABLE_TIMEOUT(socket);
UNMASK_SIGNAL();
- if (ret == -1 && errno != EAGAIN) {
+ if (ret == -1 && errno != EWOULDBLOCK) {
socket->m_error = GSOCK_IOERR;
return -1;
}
- if (errno == EAGAIN) {
+ if (errno == EWOULDBLOCK) {
socket->m_error = GSOCK_TRYAGAIN;
return -1;
}
ret = recvfrom(socket->m_fd, buffer, size, 0, &from, &fromlen);
DISABLE_TIMEOUT(socket);
UNMASK_SIGNAL();
- if (ret == -1 && errno != EAGAIN) {
+ if (ret == -1 && errno != EWOULDBLOCK) {
socket->m_error = GSOCK_IOERR;
return -1;
}
- if (errno == EAGAIN) {
+ if (errno == EWOULDBLOCK) {
socket->m_error = GSOCK_TRYAGAIN;
return -1;
}
ret = send(socket->m_fd, buffer, size, 0);
DISABLE_TIMEOUT(socket);
UNMASK_SIGNAL();
- if (ret == -1 && errno != EAGAIN) {
+ if (ret == -1 && errno != EWOULDBLOCK) {
socket->m_error = GSOCK_IOERR;
return -1;
}
- if (errno == EAGAIN) {
+ if (errno == EWOULDBLOCK) {
socket->m_error = GSOCK_TRYAGAIN;
return -1;
}
/* Frees memory allocated from _GAddress_translate_to */
free(addr);
- if (ret == -1 && errno != EAGAIN) {
+ if (ret == -1 && errno != EWOULDBLOCK) {
socket->m_error = GSOCK_IOERR;
return -1;
}
- if (errno == EAGAIN) {
+ if (errno == EWOULDBLOCK) {
socket->m_error = GSOCK_TRYAGAIN;
return -1;
}