Added linux includes for networking

TcpClient: added close_connection to shutdown the connection on both send and receive
TcpServer: changed clients list initialization from constructors to using the reserve function
This commit is contained in:
xX-TheDoctor-Xx
2016-09-16 20:38:30 +01:00
parent 3e97c0da6d
commit a9549c33e3
11 changed files with 23 additions and 3 deletions

View File

@ -245,4 +245,12 @@ enum InternalTags
#define IS_HANDSHAKE(name) name.subject == 1 || (name.tag == DisconnectTag || name.tag == ConnectTag || name.tag == Accept || name.tag == Close || name.tag == Reject)
#ifdef __linux__
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
void closesocket(int socket) { close(socket); }
#endif
#endif // DEFS_HPP