示例#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;
     }
 }