Hello - I'm using the Mabry socket controls and I'm trying to transfer a file. I've written the client server programs and everything works but there seems to be one problem and I can't figure out what is wrong.

When the file is transferred it is corrupted. I have a test program that tries to send a 75 megabyte zip file. All of this is tested in my LAN environment (even running both programs client/server apps on my on my own computer). I have compared the files and noticed that what is happening is this: If I send chunks of data of say 1024 bytes then it successfully sends around 140K of data then 1024 bytes of data after that is nothing but zeros then data is good again for a random amount of bytes then another 1024 bytes of data is nothing but zeros.

I have checked the client side and it is not ever loading the socket buffer with anywhere near 1000 zeros anywhere in the file. But, it's like random places throughout the received file have zeros in them. I'm sending data and checking for errors and when I get an error I stop sending data and wait for the send event to fire so that the mabry socket is ready to accept more data. When the file transfer finishes the file size does match - it's just it has these zeroed out chunks of data of 1024 bytes (which is the size I'm sending in a loop).

Please help.
Thanks,