I think having Available equal to 0 in the middle of a transfer is a normal thing. You can hit a point in time when you have already processed all available bytes so far and the new packet is just about to arrive. In this case Available will be 0.
You just have to account for that in your programming.
@ andre.m - Thatâs from the timeout at the end of the file. Thatâs what the try catch is for but you already new that. Its to bad there isnât someway to detect the end of file. I would of thought that the socket would close at the end but it doesnât and there isnât a byte count of the file size to work with either that I have been able to find.