Action <IProtocol, TcpClientHandler> createAction(IProtocol dummyProtocol) { Action <IProtocol, TcpClientHandler> action = null; if (dummyProtocol is Login) { action = (IProtocol protocol, TcpClientHandler handler) => { var temp = protocol as Login; SessionServer.GetInstance().SendPacketAll(protocol); }; } return(action); }
static void Main(string[] args) { ProtocolManager.GetInstance().Register(); ProtocolHandler.GetInstance().Register(); SessionServer.GetInstance().Start(); bool gameRunning = true; //ThreadManager.GetInstance().RegisterWork(() => { // Console.WriteLine("Test"); //}); while (gameRunning) { } }