Exemplo n.º 1
0
 public ServerLogic(string address, int port)
 {
     _log       = new LogEventLogic(path);
     _ipAddress = IPAddress.Parse(address);
     _port      = port;
     _listener  = new TcpListener(_ipAddress, _port);
 }
Exemplo n.º 2
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);
 }