[twsocket] TWSocketServer TWSocketClient send receive files
Hello, Can someone please guide me to a correct demo/sample of how to send receive files? thanks in advance -- 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
Re: [twsocket] TWSocketServer TWSocketClient send receive files
Can someone please guide me to a correct demo/sample of how to send receive files? Do you have any preference about the protocol to use ? What are your requirement ? Send and receive file is a little bit short to describe your needs. -- 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
Re: [twsocket] TWSocketServer TWSocketClient send receive files
I hope this was clear. Not enough. see below. I need to send single file from the server and receive single file from the client (1 file at the time such as: .txt, .exe). What about file metadata such as filename and timestamp ? What about permissions to access the file at sender side and to write the file at receiver side ? I will be sending and receiving only single files and the size will be maximum of 100MB Doesn't matter. The only special case wiuld be very small files. Is it possible to do it over the socket with for example file stream? if not what are your suggestions? 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... Basically, using HTTP client and server components is the easiest way of transfering files without the hassle of designing your own protocol. -- 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
Re: [twsocket] TWSocketServer TWSocketClient send receive files
Thanks Francois, I probably need to get into this abit more. I have some more details.. What about file metadata such as filename and timestamp ? What about permissions to access the file at sender side and to write the file at receiver side ? -- I actualy think I could handle it on the both sides very easyly because, Upload from client to the server (log files only which are .txt) with an automated process such as client will send the log file when it is asked by the server like, server sends command: getlogfile and client answers by sending the log file into a prefixed directory placed in the server with a prefixed name. Server sends an update file which is prefixed name such as setup.exe and client will save it into a prefixed directory placed in the client with a prefixed name. Everything will be done hidden at the background with no user attantion required. 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. Like: Server sends command: Get me the log file and client answers by sending the file, or server sends the setup.exe file and client responds by installing it. -- 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
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
Re: [twsocket] TWSocketServer TWSocketClient send receive files
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
Re: [twsocket] TWSocketServer TWSocketClient send receive files
Just what wanted to hear. My pleasure :-) You alos have the option to send the file in line mode and then you must encode each block for example using base64 (See OverbyteIcsMimeUtils). This is how SMTP/POP3/NNTP is handling files. This will takes more space but will offer pure line oriented protocol which you may prefer... or not. It's a matter of taste. -- 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 - Original Message - From: daniel cc dan...@signedsource.com To: ICS support mailing twsocket@elists.org Sent: Monday, February 14, 2011 2:19 PM Subject: Re: [twsocket] TWSocketServer TWSocketClient send receive files 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 -- 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