Thank you :)
Just what wanted to hear.

With best regards

-----Original Message----- From: Francois PIETTE
Sent: Monday, February 14, 2011 2:19 PM
To: ICS support mailing
Subject: Re: [twsocket] TWSocketServer & TWSocketClient send receive files

FTP, HTTTP, SMTP/POP3, NNTP are all capable of transmit file and they are
standard protocols based on TCP sockets.
You may also design your own protocol based on your own requirements which
are...
--> I actualy have the protocol which is just the command based and everything works real good and smooth but sending and receiving files is once more something which I don't know if possible to do in the same way.

You can easily add file transfer to your protocol. For example, you
implement a command "file" taking as argument the file size, filename and
timestamp (UTC). Then the sender read the file block by block and send
exactly the number of byte, then the command is finished. At receiver side,
whe the file command is received, the receiver parse file size, timestamp
and file namne, then switch linemode to off and wait the receive exatcly
filesize bytes, save it in the given file (or stream) and then switch back
linemode to on and send some OK message to the sender. Basically this is
more or less how http 1.1 is working.

--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to