in reply to Send many file via socket
Inventing your own file-transfer protocol seems like a fun way to waste a lot of time though. I'd do it by writing out a little MIMEy header for each file. Something like:
Filename: foo.zip Size: 100010
Then send the file, no encoding needed since the server knows how much data to expect. A new header could be sent after the file to send another file, or some kind of "All Done" message. The code for client and server should be easy to write.
Of course this lacks all kinds of nice stuff that scp or ftp will do for you! Key stuff to worry about - security, wacky characters in filenames, losing the network connection in the middle of a transfer, etc.
-sam
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Send many file via socket
by runrig (Abbot) on Apr 03, 2008 at 20:45 UTC |