Beispiel #1
0
        public GameClient(PlayPage playpage, string name,
                          string portUDP1, string portUDP2,
                          string portTCP1L, string portTCP1S,
                          string portTCP2L, string portTCP2S,
                          string portTCP3L, string portTCP3S)
        {
            this.playpage  = playpage;
            this.name      = name;
            this.portTCP2S = portTCP2S;

            finderUDP = new UDPListenerFinder(playpage, name, portUDP1, portUDP2);
            finderUDP.SendDiscovery();

            firstConnectionClient = TCPClientRemote.Instance;
            firstConnectionClient.initTCPClient(playpage, name);
            firstConnectionClient.initListener(portTCP3L);
            firstConnectionClient.Received += firstConnectionReceived;

            client = new TCPClientRemote();
            client.initTCPClient(playpage, name);
            client.initListener(portTCP2L);
            client.Received += OnClientReceived;
        }
Beispiel #2
0
        public GameClient(PlayPage playpage, string name,
            string portUDP1, string portUDP2,
            string portTCP1L, string portTCP1S,
            string portTCP2L, string portTCP2S,
            string portTCP3L, string portTCP3S)
        {
            this.playpage = playpage;
            this.name = name;
            this.portTCP2S = portTCP2S;

            finderUDP = new UDPListenerFinder(playpage, name, portUDP1, portUDP2);
            finderUDP.SendDiscovery();

            firstConnectionClient = TCPClientRemote.Instance;
            firstConnectionClient.initTCPClient(playpage, name);
            firstConnectionClient.initListener(portTCP3L);
            firstConnectionClient.Received += firstConnectionReceived;

            client = new TCPClientRemote();
            client.initTCPClient(playpage, name);
            client.initListener(portTCP2L);
            client.Received += OnClientReceived;
        }