Ejemplo n.º 1
0
 /// <summary>
 /// Stop handler for rebooting
 /// </summary>
 public void CloseHandler()
 {
     Thread.Sleep(1000);
     ChatServer.OnClose -= CloseHandler;
     ChatServer          = new ServerListener();
     UdpChatServer       = new UdpServerListener();
     ChatServerInit();
     ChatServer.StartListenAsync(Server.Address, Server.Port);
     StartUdpServer();
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Stop handler for rebooting
 /// </summary>
 public void CloseHandler()
 {
     Thread.Sleep(1000);
     ChatServer.OnClose -= CloseHandler;
     ChatServer = new ServerListener();
     UdpChatServer = new UdpServerListener();
     ChatServerInit();
     ChatServer.StartListenAsync(Server.Address, Server.Port);
     StartUdpServer();
 }
Ejemplo n.º 3
0
 private void buttonTSStart_Click(object sender, EventArgs e)
 {
     if (!ChatServer.IsBound)
     {
         if (Properties.Settings.Default.AfkUserState)
         {
             ChatServer.StartCheckUsers(Properties.Settings.Default.AfkUserTimeoutMs);
         }
         ChatServer.StartListenAsync(Server.Address, Server.Port);
     }
     StartUdpServer();
     EvtLog(String.Format("Server was started on TCP:[{0}], UDP:[{1}]",
                          ChatServer.ServerEndPoint, UdpChatServer.ServerEndPoint));
 }