Example #1
0
 public ListenerSerializer(int port, ISerializableObserver observer, IConnectObserver connectObserver)
 {
     this.Listener = new Listener(port, this, this);
     this.observer = observer;
     this.connectObserver = connectObserver;
     serializableIdService = ServiceLocator.GetService<SerializableIdService>();
 }
Example #2
0
 public Listener(int port, IMessageObserver observer, IConnectObserver connectObserver)
 {
     currentId = 0;
     this.observer = observer;
     this.connectObserver = connectObserver;
     connectedClients = new List<Client>();
     tcpListener = new TcpListener(IPAddress.Any, port);
     new Thread(new ThreadStart(tClientListener)).Start();
 }