Ciao,
eccoti un semplice esempio per spedire e ricevere pacchetti udp:
Dim ObjUdpClient As New System.Net.Sockets.UdpClient
ObjUdpClient.Connect("192.168.0.2", 666)
Dim SendBytes As Byte() = System.Text.Encoding.ASCII.GetBytes("c'e' qualcuno?")
ObjUdpClient.Send(SendBytes, SendBytes.Length)
Dim RemoteIpEndPoint As New System.Net.IPEndPoint(System.Net.IPAddress.Any, 0)
Dim ReceiveBytes As Byte() = ObjUdpClient.Receive(RemoteIpEndPoint)
Dim ReturnData As String = System.Text.Encoding.ASCII.GetString(ReceiveBytes)
ObjUdpClient.Close()
MessageBox.Show(ReturnData)
Enjoy It