예제 #1
0
        public void sendToPeer(int id, string command)
        {
            ClientData peer      = clients[id];
            IPAddress  ipAddress = Dns.GetHostEntry(peer.getAddress()).AddressList[0];

            sendUdp(new IPEndPoint(ipAddress, peer.getPort()), command);
        }
예제 #2
0
        public bool Equals(ClientData p)
        {
            if (p == null)
            {
                return(false);
            }

            return((getUsername() == p.getUsername()) &&
                   (getAddress() == p.getAddress()) &&
                   (getPort() == p.getPort()) &&
                   (isAlive() == p.isAlive()) &&
                   (isWerewolf() == p.isWerewolf()) &&
                   (getEndPoint() == p.getEndPoint()));
        }