I send the contents of a file with my method "sendFile" from client to server and it arrives until the end of file great. For cons, the waiter comes to write the file using the method stock but never goes out of the while loop, never finding a value of -1. That is the EOF is not found by the program. Do you have any ideas about this kind of a problem? If there is solution available with you, then kindly help me. Thanks in advance.