Last change
on this file since da692b9 was 3b1efcc, checked in by dportnoy <dmp1488@…>, 12 years ago |
The server sends back an error on failed registration and sends chat messages to all players, not just the sender. The non-blocking socket function was moved to a new file in the common folder so the client can use it.
|
-
Property mode
set to
100644
|
File size:
199 bytes
|
Line | |
---|
1 | #ifndef _COMMON_H
|
---|
2 | #define _COMMON_H
|
---|
3 |
|
---|
4 | void set_nonblock(int sock)
|
---|
5 | {
|
---|
6 | int flags;
|
---|
7 | flags = fcntl(sock, F_GETFL,0);
|
---|
8 | assert(flags != -1);
|
---|
9 | fcntl(sock, F_SETFL, flags | O_NONBLOCK);
|
---|
10 | }
|
---|
11 |
|
---|
12 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.