Abstracted sockets some more to ensure the same behavior over the entire program and on multiple platforms.
MCSocket.h should soon be deprecated and deleted Do a full rebuild (mine bugged out when I didn't) git-svn-id: http://mc-server.googlecode.com/svn/trunk@8 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
@@ -5,10 +5,10 @@
|
||||
#include "MCSocket.h"
|
||||
|
||||
#include "cMCLogger.h"
|
||||
#include <errno.h>
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <cstring>
|
||||
#include <errno.h>
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
@@ -66,11 +66,7 @@ bool cTCPLink::Connect( const char* a_Address, unsigned int a_Port )
|
||||
#endif
|
||||
|
||||
m_Socket=socket(AF_INET,SOCK_STREAM,0);
|
||||
#ifdef _WIN32
|
||||
if( m_Socket==INVALID_SOCKET )
|
||||
#else
|
||||
if( m_Socket < 0 )
|
||||
#endif
|
||||
if( !m_Socket.IsValid() )
|
||||
{
|
||||
LOGERROR("cTCPLink: Invalid socket");
|
||||
m_Socket = 0;
|
||||
|
||||
Reference in New Issue
Block a user