Пример #1
0
 public void InitNetwork(int MaxConn, int Port)
 {
     server = new Server(MaxConn, Port);
     InitClientMessage();
     InitClientEvent();
     InitCommand();
 }
Пример #2
0
        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();
        }