Re: Winsock - Transfer File
What version of VB are you using?
Re: Winsock - Transfer File
Quote:
Originally Posted by chris128
What version of VB are you using?
VB 6.0 , you can see it in my profily anyway xD
Re: Winsock - Transfer File
Quote:
Originally Posted by LoopUntil
VB 6.0 , you can see it in my profily anyway xD
lol sorry, I (like most people) dont check out the profile of every person that asks a question :P
I'm afraid I cant really help though cos I've only used VB.NET, not Vb6. Sorry, hope someone else can help you out.
Re: Winsock - Transfer File
Your sending loop is incorrect. For a 4000 byte file you'll try to do two 4000 byte reads. You should also do a sequential (not random) read in the loop.
You also need to deal with a final chunk < 4000 bytes.
Your receive logic is incorrect. It accepts one received data segment and then gives up. Typically these are about 8K bytes when receiving a steady stream. You have to receive/write in chunks as they arrive, until the final chunk.
You have provided no method to determine when a final chunk has arrived.