Exemple #1
0
        private void BroadcastTimerOnElapsed(object arg)
        {
            UdpManager tempUdpManager = UdpManager.GetInstance();

            tempUdpManager.Send(IPAddress.Broadcast, BroadcastPort, contentTcp);
            tempUdpManager.Send(IPAddress.Broadcast, BroadcastPort, contentUdp);
        }
Exemple #2
0
    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();
    }
Exemple #3
0
        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);
 }