UdpClient^ udpClient1;
udpClient1 = gcnew UdpClient;
IPAddress ^address;
int byteId;
array<Byte>^sendBytes = gcnew array<Byte>(1500);
try
{
if (!IPAddress::TryParse(DestIpAddressString, address))
{
//Invalid IP Address
return;
}
udpClient1->Connect(address, REMOTE_UDP_SOCKET);
byteId = 0;
sendBytes[byteId++] = ;
...
sendBytes[byteId++] = ;
//Transmit Packet
udpClient1->Send(sendBytes, byteId);
udpClient1->Close();
}
catch (Exception ^)
{
}
Feel free to comment if you can add help to this page or point out issues and solutions you have found. I do not provide support on this site, if you need help with a problem head over to stack overflow.