I am writing a small UDP server in Java.
When the server receives a command ('GET_VIDEO'), he reads a file ('video.raw') and then sends it to the client. My problem is ...
byte[] buffer = txtAreaSendText.getText().getBytes();// Point A
DatagramPacket dp = new DatagramPacket(buffer,buffer.length,remoteAddr, remoteTextPort);
udpSocket.send(dp);
and here is my code for receiving the string:
byte[] buffer = new byte[1024];
DatagramPacket dp ...