Exemplo n.º 1
0
        public static void SendData(string host, int port, byte[] sendBytes)
        {
            UDPClient client = new UDPClient(host, port);

            client.Connect();
            client.SendData(sendBytes);
            client.DisConnect();
        }
Exemplo n.º 2
0
        public static void SendData(string data)
        {
            byte[]    sendBytes = Encoding.ASCII.GetBytes(data);
            UDPClient client    = new UDPClient(h, p);

            client.Connect();
            client.SendData(sendBytes);
            client.DisConnect();
        }