Now showing proper error messages when sockets fail :)
Crossplatform GetLastError function in cSocket git-svn-id: http://mc-server.googlecode.com/svn/trunk@234 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
@@ -84,7 +84,7 @@ bool cBlockingTCPLink::Connect(const char * iAddress, unsigned int iPort)
|
||||
server.sin_port = htons( (unsigned short)iPort);
|
||||
if (connect(m_Socket, (struct sockaddr *)&server, sizeof(server)))
|
||||
{
|
||||
LOGWARN("cTCPLink: Connection to \"%s:%d\" failed (%s)", iAddress, iPort, m_Socket.GetLastErrorString());
|
||||
LOGWARN("cTCPLink: Connection to \"%s:%d\" failed (%s)", iAddress, iPort, cSocket::GetErrorString( cSocket::GetLastError() ).c_str() );
|
||||
CloseSocket();
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user