Core/Network: Changed AsyncAcceptor to have a start method that returns false if it can't start the network.

Core/Logging: Cleaned up network logging.
This commit is contained in:
hondacrx
2018-05-22 11:29:54 -04:00
parent a91973b1ff
commit 90751a6a28
8 changed files with 7934 additions and 43 deletions
+7 -1
View File
@@ -36,7 +36,13 @@ namespace Game.Network
if (!base.StartNetwork(bindIp, port, threadCount))
return false;
_instanceAcceptor = new AsyncAcceptor(bindIp, WorldConfig.GetIntValue(WorldCfg.PortInstance));
_instanceAcceptor = new AsyncAcceptor();
if (!_instanceAcceptor.Start(bindIp, WorldConfig.GetIntValue(WorldCfg.PortInstance)))
{
Log.outError(LogFilter.Network, "StartNetwork failed to start instance AsyncAcceptor");
return false;
}
_instanceAcceptor.AsyncAcceptSocket(OnSocketOpen);
return true;