1
0

Starting an IPv6 support / cSocket rewrite

git-svn-id: http://mc-server.googlecode.com/svn/trunk@1250 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
madmaxoft@gmail.com
2013-03-04 18:40:48 +00:00
parent 01b24d73ea
commit eb68b7ce01
4 changed files with 35 additions and 16 deletions

View File

@@ -433,11 +433,7 @@ bool cSocketThreads::cSocketThread::Start(void)
LOGERROR("Cannot create a Control socket for a cSocketThread (\"%s\"); continuing, but server may be unreachable from now on.", cSocket::GetLastErrorString().c_str());
return false;
}
cSocket::SockAddr_In Addr;
Addr.Family = cSocket::ADDRESS_FAMILY_INTERNET;
Addr.Address = cSocket::INTERNET_ADDRESS_LOCALHOST();
Addr.Port = 0; // Any free port is okay
if (m_ControlSocket2.Bind(Addr) != 0)
if (m_ControlSocket2.BindToLocalhost(cSocket::ANY_PORT) != 0)
{
LOGERROR("Cannot bind a Control socket for a cSocketThread (\"%s\"); continuing, but server may be unreachable from now on.", cSocket::GetLastErrorString().c_str());
m_ControlSocket2.CloseSocket();