1
0

Compiles for linux

git-svn-id: http://mc-server.googlecode.com/svn/trunk@6 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
faketruth
2011-10-21 21:25:29 +00:00
parent 7e010e7f8f
commit c7b4b9f819
20 changed files with 399 additions and 208 deletions

View File

@@ -1,5 +1,10 @@
#include "cSocket.h"
#ifndef _WIN32
#include <netdb.h>
#include <unistd.h>
#endif
cSocket::cSocket( xSocket a_Socket )
: m_Socket( a_Socket )
{
@@ -28,3 +33,12 @@ bool cSocket::IsValid()
#endif
}
void cSocket::CloseSocket()
{
#ifdef _WIN32
closesocket(m_Socket);
#else
shutdown(m_Socket, SHUT_RDWR);//SD_BOTH);
close(m_Socket);
#endif
}