Re: Any way to transfer complete file through Winsock/TCPIP
I dont know if this would help but it shows u how to download via HTTP
Re: Any way to transfer complete file through Winsock/TCPIP
Chander, you are asking the impossible.
There is NO way to send a file in one shot (if the file is less than 4K maybe yes), but ALL data is broken in packets, and there's nothing you can do about it.
If there are programs that say they send the file in one go, in the backgound/dehind the scenes they still break the data in packets.
You said that you either want the file to be sent complectly or not at all.
Well, when the connection is closed, you can simply check if the file is complete, and if it's not, then just delete it.
This is what my file transfer example does:
VB - How to send a file using the Winsock control
It still has to send in packets, as I was saying before, there is nothing you can do about that, either live with it (accept it) or don't send files over internet/network at all, because ANY data that you send/receive is broken is packets.
Re: Any way to transfer complete file through Winsock/TCPIP
theres loads of examples here and at pscode.com the all split the file up (unless the file is very small), as log as its coded right it will get there fine and work. You can check that the received file is the same size as the original (programatically), and you can get the MD5 hash of the file, send it to the client and have it validated, this would ensure the file got there exactly as the original. Winsock is fine for file transfer theres millions of examples