From cf94994f8e3b34bc871e2c3b2558f8301146810c Mon Sep 17 00:00:00 2001 From: faketruth Date: Sun, 23 Oct 2011 00:18:44 +0000 Subject: 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 --- source/cTCPLink.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'source/cTCPLink.cpp') diff --git a/source/cTCPLink.cpp b/source/cTCPLink.cpp index 0efc0254f..bfd987bd9 100644 --- a/source/cTCPLink.cpp +++ b/source/cTCPLink.cpp @@ -5,10 +5,10 @@ #include "MCSocket.h" #include "cMCLogger.h" +#include #ifndef _WIN32 #include -#include #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; -- cgit v1.2.3