I want to send a object (which contains a File) to a server via datagramSockets aka (UDP)
So the steps are:
1 - create object: Obj o = new Obj (File, String, int).
2 - convert file to bytearray
3 - convert object to byte array
Then, having created the datagram sockets procedures i have.
4 - socketUdp.send (byteArray_of_Object)
The problem is: When the server try to receive the data it throws an exception saying: "Ocupied port".
But if i dont include the File in the object everything goes OK.
Any ideas why it could be happening ?