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); }
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())); }