Пример #1
0
 public Client(string serverUrl)
 {
     _serverUrl   = serverUrl;
     _myCaptain   = new MyCaptain();
     _transmitter = new HttpTransmitter();
     _listener    = new HttpListenerClass(3);
 }
Пример #2
0
 public void StopListening()
 {
     if (_listener != null)
     {
         _listener.Stop();
         _listener.Dispose();
         _listener = null;
     }
 }
Пример #3
0
 public void ListenForPlayers()
 {
     if (_listener == null)
     {
         _listener = new HttpListenerClass(3);
         _listener.Start(5999);
         _listener.ProcessRequest += Listener_ProcessRequest;
     }
 }