DatagramSocket SERVERSOCKET = new DatagramSocket(9999);
byte[] receiveData = new byte[2000];
while (true)
{
DatagramPacket receivePacket = new DatagramPacket(receiveData, receiveData.length);
SERVERSOCKET.receive(receivePacket);
String LINE = new String( receivePacket.getData());
InetAddress iPAddress = receivePacket.getAddress();
int port = receivePacket.getPort();
}
Ok I have this right now, I have been googling, yet I do not know how to do a checksum of this UDP packet I am receiving. I do know the packet includes a header checksum. But I want a checksum for the DATA. Can anyone point me in the right direction?