Esempio n. 1
0
 public void ListenAsServer(int port)
 {
     LogFile.WriteLine("NetworkController.  Listen as server port " + port);
     IsServer           = true;
     connectiontoserver = null;
     connections        = new Dictionary <object, NetworkLevel2Connection>();
     networkimplementation.ListenAsServer(port);
 }
Esempio n. 2
0
 public void Go(int port)
 {
     net = NetworkImplementationFactory.CreateNewInstance();
     net.ListenAsServer(port);
     net.ReceivedPacket += new Level1ReceivedPacketHandler(net_ReceivedPacket);
     while (true)
     {
         net.Tick();
         Thread.Sleep(50);
     }
 }
Esempio n. 3
0
 public void Go(int port)
 {
     net = NetworkImplementationFactory.CreateNewInstance();
     net.ListenAsServer(port);
     net.ReceivedPacket += new Level1ReceivedPacketHandler(net_ReceivedPacket);
     while (true)
     {
         net.Tick();
         Thread.Sleep(50);
     }
 }