- Timestamp:
- 2005-12-16T17:58:00Z (17 years ago)
- Branches:
- master
- Children:
- 12c6634, 4bfca70
- Parents:
- c4168f4
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sock.h
rc4168f4 r701acdd4 6 6 #include <netdb.h> 7 7 #define sock_make_nonblocking(fd) fcntl(fd, F_SETFL, O_NONBLOCK) 8 #define sock_make_blocking(fd) fcntl(fd, F_SETFL, 0) 8 9 #define sockerr_again() (errno == EINPROGRESS || errno == EINTR) 9 10 #define closesocket(a) close(a) … … 22 23 # define mode_t int 23 24 # define sock_make_nonblocking(fd) { int non_block = 1; ioctlsocket(fd, FIONBIO, &non_block); } 25 # define sock_make_blocking(fd) { int non_block = 0; ioctlsocket(fd, FIONBIO, &non_block); } 24 26 # define sockerr_again() (WSAGetLastError() == WSAEINTR || WSAGetLastError() == WSAEINPROGRESS || WSAGetLastError() == WSAEWOULDBLOCK) 25 27 # define ETIMEDOUT WSAETIMEDOUT
Note: See TracChangeset
for help on using the changeset viewer.