public void InitNetwork(int MaxConn, int Port) { server = new Server(MaxConn, Port); InitClientMessage(); InitClientEvent(); InitCommand(); }
private static void Main(string[] args) { SynContext = new SynchronizationContext(); SynchronizationContext.SetSynchronizationContext(SynContext); server = new Server(1000, 48360); server.StatusMessage += new EventHandler<StatusMessageArgs>(OnStatusMessage); server.Listen(); server.EnterMainLoop(); }