This commit is contained in:
Sergio R. Caprile 2023-06-06 18:48:45 -03:00
parent 0625b97246
commit 6511b6dd5d
2 changed files with 7 additions and 1 deletions

View File

@ -629,7 +629,10 @@ struct timeval {
#define MG_SOCK_RESET(errcode) \
((errcode) == BSD_ECONNABORTED || (errcode) == BSD_ECONNRESET)
#define MG_SOCK_INTR(fd) 0
// In blocking mode, which is enabled by default, accept() waits for a
// connection request. In non blocking mode, you must call accept()
// again if the error code BSD_EWOULDBLOCK is returned.
#define MG_SOCK_INTR(fd) (fd == BSD_EWOULDBLOCK)
#define socklen_t int
#endif

View File

@ -16,6 +16,9 @@
#define MG_SOCK_RESET(errcode) \
((errcode) == BSD_ECONNABORTED || (errcode) == BSD_ECONNRESET)
// In blocking mode, which is enabled by default, accept() waits for a
// connection request. In non blocking mode, you must call accept()
// again if the error code BSD_EWOULDBLOCK is returned.
#define MG_SOCK_INTR(fd) (fd == BSD_EWOULDBLOCK)
#define socklen_t int