Compiles for linux
git-svn-id: http://mc-server.googlecode.com/svn/trunk@6 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user