public void SendToClient(byte[] data, IPEndPoint destinationIP) { UdpServerConnection udpServerConnection = udpConnection as UdpServerConnection; if (udpServerConnection != null) { udpServerConnection.Send(data, destinationIP); } }
public void Broadcast(byte[] data) { UdpServerConnection udpServerConnection = udpConnection as UdpServerConnection; if (udpServerConnection != null) { using (var iterator = UdpConnectionManager.Instance.ClientsIPs.GetEnumerator()) while (iterator.MoveNext()) { udpServerConnection.Send(data, iterator.Current); } } }