Changes in common/Common.h [e607c0f:3b1efcc] in network-game
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
common/Common.h
re607c0f r3b1efcc 4 4 void set_nonblock(int sock) 5 5 { 6 #ifdef WIN32 7 unsigned long mode = 1; 8 ioctlsocket(sock, FIONBIO, &mode); 9 #else 10 int flags; 11 flags = fcntl(sock, F_GETFL,0); 12 assert(flags != -1); 13 fcntl(sock, F_SETFL, flags | O_NONBLOCK); 14 #endif 6 int flags; 7 flags = fcntl(sock, F_GETFL,0); 8 assert(flags != -1); 9 fcntl(sock, F_SETFL, flags | O_NONBLOCK); 15 10 } 16 11
Note:
See TracChangeset
for help on using the changeset viewer.