Last change
on this file since 01d0d00 was 4c202e0, checked in by dportnoy <dmp1488@…>, 12 years ago |
Added Player to the visual studio project, changed Common to use the #defines in Compiler.h, and added basic client support for processing MSG_TYPE_PLAYER messages
|
-
Property mode
set to
100644
|
File size:
310 bytes
|
Line | |
---|
1 | #include "Common.h"
|
---|
2 |
|
---|
3 | void set_nonblock(int sock)
|
---|
4 | {
|
---|
5 | #if defined WINDOWS
|
---|
6 | unsigned long mode = 1;
|
---|
7 | ioctlsocket(sock, FIONBIO, &mode);
|
---|
8 | #elif defined LINUX
|
---|
9 | int flags;
|
---|
10 | flags = fcntl(sock, F_GETFL,0);
|
---|
11 | assert(flags != -1);
|
---|
12 | fcntl(sock, F_SETFL, flags | O_NONBLOCK);
|
---|
13 | #endif
|
---|
14 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.