private void BroadcastTimerOnElapsed(object arg) { UdpManager tempUdpManager = UdpManager.GetInstance(); tempUdpManager.Send(IPAddress.Broadcast, BroadcastPort, contentTcp); tempUdpManager.Send(IPAddress.Broadcast, BroadcastPort, contentUdp); }
void Start() { UdpManager client = new UdpManager(SC.CLIENT); for (int i = 0; i < 20; i++) { client.Send(System.Text.Encoding.Unicode.GetBytes("客户端发来Test----" + i + "----"), m_RemotePoint); } client.Receive(); }
public void BroadcastToInterNetwork(string data) { UdpManager tempUdpManager = UdpManager.GetInstance(); tempUdpManager.Send(IPAddress.Broadcast, BroadcastPort, data); }
/// <summary> /// UDPで送信します。 /// </summary> /// <param name="value">送信値</param> public void SendUdp(string value) { _udpManager.Send(value); }