|
-
Nov 28th, 2000, 06:17 AM
#1
Thread Starter
Addicted Member
is there any way to transfer whole file in one go ( no matter how much big it is) through Win socket or TCP IP .
Don't give FTP solution i don't want that.In winsocket
File has to be broken up for sending data, but i don't want that , any way to send file in one go . Or any other third party control which can transfer file to server from client.
It should be like , client sends it to server , server should not pull it from client means it should be a client side solution .Any one can help . Any suggestion will be appreciated .
Chander
-
Nov 28th, 2000, 06:36 AM
#2
PowerPoster
Search VBW, they have such a file transfer sample here (Note: you must send the file in parts)
-
Nov 28th, 2000, 06:56 AM
#3
Thread Starter
Addicted Member
I made a search on VBW but all examples / controls are using break up of files.Any other way to send upload file
except winsock and ftp . ftp i don't want as two users at same time can not login.
chander
-
Nov 28th, 2000, 08:54 AM
#4
Fanatic Member
You can always uuencode the file before sending it (much like a newsgroup's attachment) though regardless of how you send it, the file _will_ need to be split up. It's just the nature of tcp/ip and the net no way around that unless you set up a direct connect and use a virtual lan, though I think that does it behind the scenes as well. Even back in the old BBS days (Electronic Bulletin Boards before the net came anywhere near into play) you had to split up a file to send it for any type of reliable transfer. It's a fact of life.
-
Nov 29th, 2000, 02:27 AM
#5
Thread Starter
Addicted Member
my concern is , data should reach complete on server.By spliting up , may be packets doesn't reach sequencially ,
and file format may be spoil.Second if any packets left around , like if connection is cut or by some other mean ,
complete transfer wouldn't happen .I want either complete file or nothing . Or first i transfer whole data then write
on file server ( but it is not possible i think , i have to
write on server as i will recv data.) like in transferring
data by spliting up , there is no surity that complete file in proper format will reach there. any suggestion on it ???
Chander
-
Nov 29th, 2000, 08:33 AM
#6
PowerPoster
chander,
Well, you're not recommended to use WinSock comntrol to send a complete file from 1 terminal to another terminal.
Because this will involve a lot of coding:[*] You need to send the File name, File size or File path to the remote terminal.[*] You need to read the file block by block (e.g. 4K each time)[*] You need to ensure all the data is completed send before you can proceed to send the next block of data. Normally you can use the SendComplete events in Winsock control.[*] You need to inform the remote terminal about the end of file, so that it can close the downloaded file.
This may even worst when you try to transfer a file through internet.
Hope, this can give you some hint.
-
Nov 29th, 2000, 10:43 AM
#7
Thread Starter
Addicted Member
ya , but any other way to send data from client to server other than FTP .
Chander
-
Nov 16th, 2006, 10:28 AM
#8
New Member
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
-
Nov 16th, 2006, 11:24 AM
#9
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.
-
Nov 16th, 2006, 11:37 AM
#10
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|