Пример #1
0
        public static void StartServer()
        {
            UpnpPorts.OpenPort(port);

            server = new TcpListener(new IPEndPoint(IPAddress.Parse("0.0.0.0"), port));

            server.Start();
            StartListening();
        }
Пример #2
0
 private void Connected()
 {
     new Client().ConnectToServer(UpnpPorts.GetIp().ToString());
 }
Пример #3
0
 public static void StopServer()
 {
     UpnpPorts.RemovePortMapping(port);
     server.Stop();
 }