Пример #1
0
 public ClientLogic(TcpClient tcpClient, ServerLogic serverLogic)
 {
     db = new MessageContext();
     db.Messages.Load();
     _log    = new LogEventLogic("V:\\client.log");
     Id      = Guid.NewGuid().ToString();
     _client = tcpClient;
     _server = serverLogic;
     serverLogic.AddConection(this);
 }
Пример #2
0
 public void ServerListener()
 {
     try
     {
         _server       = new ServerLogic("0.0.0.0", 4000);
         _listenThread = new Thread(new ThreadStart(_server.Start));
         _listenThread.Start();
     }
     catch (Exception ex)
     {
         _server.Stop();
         _log.Write(ex.Message);
     }
 }