src/Network/Platform.hh
author Tero Marttila <terom@fixme.fi>
Fri, 16 Jan 2009 22:03:49 +0200
changeset 400 d64bf28c4340
parent 399 src/Network/Platform.h@c7295b72731a
child 423 947ab54de4b7
permissions -rw-r--r--
more documentation tweaking, all Network/ files now have a @file comment. Fix Platform.h -> Platform.hh, and Buffer.hh + Packet.cc
#ifndef NETWORK_PLATFORM_HH
#define NETWORK_PLATFORM_HH

/**
 * @file
 *
 * Takes care of platform-specific imports and #defines as regards the Network code
 */

#ifndef WIN32
    // NetworkAddress
    #include <netinet/in.h>
    
    // NetworkEndpoint
    #include <sys/types.h>
    #include <netdb.h>
    
    // NetworkSocket
    #include <sys/types.h>
    #include <sys/socket.h>
    #include <unistd.h>
    #include <fcntl.h>
    #define closesocket close
    
    // NetworkReactor
    #include <sys/select.h>
    #include <errno.h>

    // misc, here because ClanLib included these... 
    #include <arpa/inet.h>
    #include <sys/time.h>
    #include <unistd.h> 
#else
    // misc, here because ClanLib included these...
    #include <winsock2.h>
    #include <windows.h>
    typedef int socklen_t;

    #error "This network code won't compile on win32 :)"
#endif


#endif