Changeset cdb4bec in network-game for common/Common.h


Ignore:
Timestamp:
Dec 9, 2012, 8:59:18 PM (12 years ago)
Author:
dportnoy <dmp1488@…>
Branches:
master
Children:
3f5616f
Parents:
da692b9 (diff), e607c0f (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of github.com:weretaco/network-game

File:
1 edited

Legend:

Unmodified
Added
Removed
  • common/Common.h

    rda692b9 rcdb4bec  
    44void set_nonblock(int sock)
    55{
    6     int flags;
    7     flags = fcntl(sock, F_GETFL,0);
    8     assert(flags != -1);
    9     fcntl(sock, F_SETFL, flags | O_NONBLOCK);
     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
    1015}
    1116
Note: See TracChangeset for help on using the changeset viewer.