posted 12 years ago
Hey guys!
I'm busy developing a chat program and want to add a file sending capability.
I managed to write a standalone server and client to JUST send a file and it worked.
However, when I incorporated it into my chat program it does not work properly. The file is copied but it doesn't break out of the while loop.
I'm doing it using a byte[] array and a DataInputStream.
Here is the basics of what it looks like (and it works in the standalones)
Now the client works perfect, sending everything and printing the last number of bytes. But the server does not pick up the last lot and so doesn't break out of the loop.
Thanks