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

@@ -188,12 +188,7 @@ bool cServer::InitServer(cIniFile & a_SettingsIni)
int Port = a_SettingsIni.GetValueSetI("Server", "Port", 25565);
cSocket::SockAddr_In local;
local.Family = cSocket::ADDRESS_FAMILY_INTERNET;
local.Address = cSocket::INTERNET_ADDRESS_ANY;
local.Port = (unsigned short)Port;
if( m_pState->SListenClient.Bind( local ) != 0 )
if (m_pState->SListenClient.BindToAny(Port) != 0)
{
LOGERROR("bind fail (%s)", cSocket::GetErrorString( cSocket::GetLastError() ).c_str() );
return false;