Changeset 4c202e0 in network-game for common


Ignore:
Timestamp:
Dec 25, 2012, 6:59:58 PM (12 years ago)
Author:
dportnoy <dmp1488@…>
Branches:
master
Children:
3b8adee
Parents:
edfd1d0
Message:

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

Location:
common
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • common/Common.cpp

    redfd1d0 r4c202e0  
    33void set_nonblock(int sock)
    44{
    5    #ifdef WIN32
     5   #if defined WINDOWS
    66      unsigned long mode = 1;
    77      ioctlsocket(sock, FIONBIO, &mode);
    8    #else
     8   #elif defined LINUX
    99      int flags;
    1010      flags = fcntl(sock, F_GETFL,0);
  • common/Common.h

    redfd1d0 r4c202e0  
    22#define _COMMON_H
    33
    4 #include <fcntl.h>
    5 #include <assert.h>
     4#include "Compiler.h"
     5
     6#if defined WINDOWS
     7   #include <winsock2.h>
     8   #include <WS2tcpip.h>
     9#elif defined LINUX
     10   #include <fcntl.h>
     11   #include <assert.h>
     12#endif
    613
    714void set_nonblock(int sock);
  • common/Player.cpp

    redfd1d0 r4c202e0  
    22
    33#include <iostream>
    4 #include <arpa/inet.h>
    54
    65using namespace std;
  • common/Player.h

    redfd1d0 r4c202e0  
    22#define _PLAYER_H
    33
    4 #include <netinet/in.h>
     4#include "Compiler.h"
     5
     6#if defined WINDOWS
     7   #include <winsock2.h>
     8   #include <WS2tcpip.h>
     9#elif defined LINUX
     10   #include <netinet/in.h>
     11#endif
     12
    513#include <string>
    614
Note: See TracChangeset for help on using the changeset viewer.