[twsocket] ICS Sockets for sending receiving files
Hi I want to use ICS Sockets to send/receive files but can't see any example. All examples are for Text.After working on developing my application with FTP and getting to production stage I get to know that AntiViruses hate FTP and they just throw my application out. Therefore I am looking at Basic Sockets for sending files. RegardsAllan Fernandes -- 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
[twsocket] Socket States
Hi, Can I seggregate the Socket states such that 1)if all is well and workable then we are in either wsConnected or wsListening state. 2)After Close or Error etc and after timeout elapses we will go into wsClosed 3) All below states are temporary and will in a minute or so go into the two above mentioned states ? wsInvalidState,wsOpened,wsBound,wsConnecting, wsSocksConnected, ,wsAccepting, I am asking this as I do not want to re-attempt connecting during the intermediate states. RegardsAllan -- 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
[twsocket] TWSocket Timeout Property ?
Hi, If I try to connect my TWSocket and there is no socket listening on the other end then the TWSocket's state goes into wsConnecting for a long time. I want to reduce that Timeout. Which property should I use ? RegardsAllan -- 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] ICS Server disconnects on intensive testing
Hi, Yes I am using the ICS TFTPServer. No SSL. ICS version 8.44 March. Delphi Seattle.Two physical Win7 machines with a VM in each effectively 4 machines.All sending files to a single machine in quick succession.After copy I am checking size and Renaming the file.Using TFtpClient in ASync mode. RegardsAllan From: Angus Robertson - Magenta Systems Ltd To: twsocket@lists.elists.org Sent: Friday, 29 September 2017 6:25 PM Subject: Re: [twsocket] ICS Server disconnects on intensive testing > When doing intensive testing (4 machines Put/Get 200 files) the > ICS server aborts connection at times in Passive mode. Works fine > in Active mode.If I use another server (eg. ALFTP) all is fine > even in Passive mode. Are you talking about the ICS FTP server? You don't say FTP anywhere. With or without SSL? Presumably the latest V8.50 version from August? Is the server running on Windows Server OS, or a client windows? You say 'intensive', what does that mean? I've tested hundreds of simultaneous FTP sessions, but it was a long time ago. Angus -- 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
[twsocket] ICS Server disconnects on intensive testing
Hi, When doing intensive testing (4 machines Put/Get 200 files) the ICS server aborts connection at times in Passive mode. Works fine in Active mode.If I use another server (eg. ALFTP) all is fine even in Passive mode. Warm RegardsAllan I get following error on Client Side LastResponse was : 501 Cannot RETR. Error - Connection aborted (#10053) CategoryBTS:B Error = 501 (501 Cannot RETR. Error - Connection aborted (#10053)) CategoryBTS:B Relevant Extract of Server Side log > 192.168.0.77=ics [120012ms] 501 Cannot RETR. Error - Connection aborted (#10053) ! 192.168.0.77=ics Data session closed. Error #10053 < 192.168.0.77=ics QUIT > 192.168.0.77=ics [0ms] 221 Goodbye. ! 192.168.0.77=ics disconnected after 123 secs, total recv 674, total xmit 9.48K Entire server log is very lengthy therefore attaching in separate email -- 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
[twsocket] Role of Error in Socket OnConnectedEvents
Hi, In the ICS Socket components's OnSessionConnected / OnClientConnect events you are passing Error parameter. When will this get a value ?If the OnConnected events are triggered does it mean connection is active or is it only if Error=0 ? RegardsAllan Fernandes -- 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] Aborting a File Transfer from FtpServer
Hi, Just wanted to know if there is a ready made option to stop a transfer midway. Now that you have cleared my doubts I will program accordingly. ThanksAllan From: Angus Robertson - Magenta Systems Ltd To: twsocket@lists.elists.org Sent: Tuesday, 11 July 2017 4:36 PM Subject: Re: [twsocket] Aborting a File Transfer from FtpServer > My Program has a Client Side and a Server Side. I have taken care > that the Client side can abort a file transfer. Now I wanted to > provide Abort on the Server Side as well. or Is this not they way > it is done ? The FTP server is usually non-interactive, it would not consider aborting a transfer part way through. There are no protocol commands for reverse ABORT, or indeed to confirm a transfer has successfully completed or been stopped part way through, the data connection is simply closed by the server. The server can decide not to start a transfer and return an error code instead, perhaps that is what you mean by abort? If the server PC was closing down, all sockets would simply close. Angus -- 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] Aborting a File Transfer from FtpServer
My Program has a Client Side and a Server Side. I have taken care that the Client side can abort a file transfer. Now I wanted to provide Abort on the Server Side as well. or Is this not they way it is done ? From: Angus Robertson - Magenta Systems Ltd To: twsocket@lists.elists.org Sent: Tuesday, 11 July 2017 2:07 PM Subject: Re: [twsocket] Aborting a File Transfer from FtpServer > What is the correct way of Aborting a File Transfer from > TFtpServer ? The FTP server does not care how you stop a download, it can cope with the ABORT command or lost connection. Angus -- 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
[twsocket] Aborting a File Transfer from FtpServer
Hi, What is the correct way of Aborting a File Transfer from TFtpServer ? RegardsAllan -- 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] Aborting PUT
I was looking at TMagFtp and yes it does everything. But I have already done most of my modules in Async type coding. Only remaining is the Resume option. Thanks for the suggestion. Question: With TFtpClient to Resume transfer do I have to know the remote file size ? RegardsAllan From: Angus Robertson - Magenta Systems Ltd To: twsocket@lists.elists.org Sent: Friday, 16 June 2017 3:38 PM Subject: Re: [twsocket] Aborting PUT > I have a backup application that I am revamping. You got me > right, I am using both the Client and Server modules as my > application is loaded on Source machine and Destination too. I > get your point that I will have to work from the Client side > majorly and not from the Server side.Thanks I will do just that. You will find the TMagFtp component works very closely with the ICS web server, for bulk file uploads and downloads, with all the automated file checking and resumed uploads handled automatically, and extensively tested for 12 years. In particular they use special commands to index sub-directories, so a single FTP call will return a list of thousands of sub-directories, whereas a normal FTP server would need to list each one separately with thousands of commands. Suggest you test the compiled xferdemo3.exe demo against the ICS FTP server sample. It will save you a lot of development effort. Angus -- 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] Aborting PUT
I have a backup application that I am revamping. You got me right, I am using both the Client and Server modules as my application is loaded on Source machine and Destination too. I get your point that I will have to work from the Client side majorly and not from the Server side.Thanks I will do just that. From: Angus Robertson - Magenta Systems Ltd To: twsocket@lists.elists.org Sent: Friday, 16 June 2017 12:47 PM Subject: Re: [twsocket] Aborting PUT > From what I gather is that MagFTP is the Client Side. For client > side I will refer your logic, Thanks. My requirement is for the > Server Side. I can also pass the command from Client side to the > Server to do the rename but I thought Server doing the Rename > would be faster and would also help my flow of logic. So can I > get actual Filesize on the server side ? Sorry, I thought you were writing both client and server. The server has no concept of what was supposed to be uploaded and can not check anything. Partial uploads were common in the days of dial-up internet and now with flakey mobile connections. But it's the client's job to check the server has received the file correctly, with CRC, file size, etc. Don't delete a partially uploaded file, the client may want to resume the upload, which TMagFtp handles. Angus -- 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] Aborting PUT
From what I gather is that MagFTP is the Client Side. For client side I will refer your logic, Thanks. My requirement is for the Server Side. I can also pass the command from Client side to the Server to do the rename but I thought Server doing the Rename would be faster and would also help my flow of logic. So can I get actual Filesize on the server side ? RegardsAllan From: Angus Robertson - Magenta Systems Ltd To: twsocket@lists.elists.org Sent: Thursday, 15 June 2017 4:17 PM Subject: Re: [twsocket] Aborting PUT > How does Server understand that FtpClient Aborted the PUT. In > 'OnStorSessionClosed' 'Error=0'. > > My intention is that at PUT of a file I rename the HostFilename > to Filename$$ and when completely received at Server side Server > will rename it back to 'Filename' by removing the ending $$. > Sorry for all the trouble I am giving you. Suggest you look at the source code for TMagFtp at: https://www.magsys.co.uk/delphi/magxfer.asp which does all this already. Generally, you check the correct sized file has arrived, and perhaps run a CRC or MD5 check on it, to check it's not corrupted before renaming it to the final name, if the server supports such commands. Angus -- 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
[twsocket] Aborting PUT
Hi, How does Server understand that FtpClient Aborted the PUT. In 'OnStorSessionClosed' 'Error=0'. My intention is that at PUT of a file I rename the HostFilename to Filename$$ and when completely received at Server side Server will rename it back to 'Filename' by removing the ending $$. Sorry for all the trouble I am giving you. RegardsAllan -- 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] FtpServer Event for Receiving File
Thanks One more related question. In the OnStorSessionClosed the Client.FilePath gives the Filename too. If this is standard behavior then I do not need to concatenate the Path and Filename. RegardsAllan From: Angus Robertson - Magenta Systems Ltd To: twsocket@lists.elists.org Sent: Wednesday, 14 June 2017 3:56 PM Subject: Re: [twsocket] FtpServer Event for Receiving File > When a File has been received at the Server end which is the > event that will indicate that ? OnStorSessionClosed. Angus -- 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
[twsocket] FtpServer Event for Receiving File
Hi, When a File has been received at the Server end which is the event that will indicate that ? RegardsAllan -- 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] Want FtpClient to be able to pull files from any Drive
Removing ftpsCdupHome took care of it. Thanks for the quick reply. Reduced much of my unnecessary work. From: Angus Robertson - Magenta Systems Ltd To: twsocket@lists.elists.org Sent: Tuesday, 13 June 2017 2:51 PM Subject: Re: [twsocket] Want FtpClient to be able to pull files from any Drive > I want to allow the FtpClient to be able to pull files from any > Drive of the FtpServer machine. Issue is that I cannot go beyond > my HomeDirectory. I have made 'Allowed := True' in > 'OnChangeDirectory' Event in FtpServer. You need to remove ftpsCdupHome from Options, it's a deliberate feature to stop hackers getting at sensitive directories. But generally we don't support or test random directory use so there may be other issues. Angus -- 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
[twsocket] Want FtpClient to be able to pull files from any Drive
Hi, I want to allow the FtpClient to be able to pull files from any Drive of the FtpServer machine. Issue is that I cannot go beyond my HomeDirectory. I have made 'Allowed := True' in 'OnChangeDirectory' Event in FtpServer. RegardsAllan -- 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
[twsocket] Recognising FTP Activity
Is there a way to understand that File Transfer is actively taking place on FTP Client side eg: FtpClient.State / FtpClient.Connected ? -- 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
[twsocket] Can I send few text lines along with file FTP
When I send a file via FTPClient I would like to send additional details (Text) so that FTPServer knows what he has to do with that file. How do I accomplish this ? -- 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] Max FTP connections
That is Perfect for me. Thanks for the Utility too. From: Angus Robertson - Magenta Systems Ltd To: twsocket@lists.elists.org Sent: Monday, 27 March 2017 3:35 PM Subject: Re: [twsocket] Max FTP connections > What can be the maximum number of FTP clients connected to the > FTPServer. I've tested over 200 simultaneous FTP sessions, but see below. > What can be the maximum number of clients connected to the Socket > Server. I've tested 2,000 simultaneous TCP/IP sessions in a single thread, on Windows 10. The main limitation I found was connection time, particularly with SSL which has a heavy overhead opening each new session. So there is a restriction to how many new sessions can be opened each second, I think it was about 100 with SSL TLS/1.2, although that might improve with the next generation TLS/1,3 which is more efficient. Look back to the Stress Testing message I posted on 14 Sep 2016 which explains all this, including details of the tools I wrote for testing, which you can download from my web site. https://www.magsys.co.uk/download/software/cm5beta.zip Angus -- 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
[twsocket] Max FTP connections
Hi, What can be the maximum number of FTP clients connected to the FTPServer. What can be the maximum number of clients connected to the Socket Server. RegardsAllan -- 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
[twsocket] best practice for upload status
Hi, Previous advice worked (NoFeat) thanks. What would be the simplest method to track how many bytes/files have been uploaded/downloaded. Checked the CopyEvent but cannot understand exactly when to trap the details ? Regards Allan -- 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
[twsocket] FTP and Memo - LogText?
Hi, Noticed odd bug in the FTP Transfer program. Just informing you so you can check similar situation at your side. Simply remark the line as shown below and the FTP transfer function misbehaves. I used OverbyteIcsSslFtpServ.exe on another machine whose logs I have given below. Situation : Server and Client had same single file and ideally no copy should happen. In demomain3.pas ___ procedure TForm1.AddLogText (S: string) ; begin if Application.Terminated then exit ; //LogText.Lines.Add (S) ; // general unformatted comments about xfers end ; Misbehavior, with the remark. Took long so stopped transfer. ___ ! 192.168.0.33 connected < 192.168.0.33 HOST allan-1 ! Could not find Accounts File: c:\documents and settings\allan\desktop\ftp\ftpaccounts-allan-1.ini > 192.168.0.33 504 HOST unknown or not allowed. < 192.168.0.33 USER ics ! Opening Accounts File: c:\documents and settings\allan\desktop\ftp\ftpaccounts-default.ini > 192.168.0.33 331 Password required for ics. < 192.168.0.33 PASS ics ! 192.168.0.33=ics is authenticated ! 192.168.0.33=ics Home Directory: c:\temp\ > 192.168.0.33 230 User ics logged in. < 192.168.0.33 PWD > 192.168.0.33 257 "/" is current directory. < 192.168.0.33 FEAT > 192.168.0.33 211-Extensions supported: HOST SIZE REST STREAM MDTM MDTM MMDDHHMMSS[+-TZ] filename MLST size*;type*;perm*;create*;modify*; MFMT MD5 XCRC "filename" start end XMD5 "filename" start end CLNT SITE INDEX;ZONE;CMLSD;DMLSD MODE Z XCMLSD XDMLSD UTF8 LANG EN* OPTS MODE;UTF8; AUTH TLS;SSL; CCC PROT C;P; PBSZ 211 END < 192.168.0.33 CLNT ICS FTP Client V7.28 > 192.168.0.33 200 Noted OK. < 192.168.0.33 OPTS UTF8 ON > 192.168.0.33 200 UTF8 ON Ok. < 192.168.0.33 TYPE I > 192.168.0.33 200 Type set to I. < 192.168.0.33 SYST > 192.168.0.33 215 UNIX Type: L8 Internet Component Suite < 192.168.0.33 CWD /dsafebackftp/ > 192.168.0.33 250 CWD command successful. "/dsafebackftp" is current directory. < 192.168.0.33 PWD > 192.168.0.33 257 "/dsafebackftp" is current directory. < 192.168.0.33 PASV > 192.168.0.33 227 Entering Passive Mode (192,168,0,50,64,2). < 192.168.0.33 XDMLSD -R > 192.168.0.33 226 File sent ok < 192.168.0.33 CWD /dsafebackftp/[af]/ > 192.168.0.33 250 CWD command successful. "/dsafebackftp/[af]" is current > directory. > 192.168.0.33 451 Failed: Access violation at address 004B9E39 in module > 'OverbyteIcsSslFtpServ.exe'. Read of address . < 192.168.0.33 PWD > 192.168.0.33 257 "/dsafebackftp/[af]" is current directory. < 192.168.0.33 CWD / > 192.168.0.33 250 CWD command successful. "/" is current directory. < 192.168.0.33 PWD > 192.168.0.33 257 "/" is current directory. < 192.168.0.33 CWD dsafebackftp > 192.168.0.33 250 CWD command successful. "/dsafebackftp" is current directory. < 192.168.0.33 CWD /dsafebackftp/[af]/ > 192.168.0.33 250 CWD command successful. "/dsafebackftp/[af]" is current > directory. < 192.168.0.33 PWD > 192.168.0.33 257 "/dsafebackftp/[af]" is current directory. < 192.168.0.33 ALLO 67115045 > 192.168.0.33 200 ALLO OK, 41588469760 bytes available. < 192.168.0.33 PASV > 192.168.0.33 227 Entering Passive Mode (192,168,0,50,64,4). < 192.168.0.33 STOR af_d1_ftp_0002f_zip.tmp > 192.168.0.33 150 Opening data connection for af_d1_ftp_0002f_zip.tmp. > 192.168.0.33 226 File received ok ! 192.168.0.33 disconnected Log with the remark worked fine. ___ ! 192.168.0.33 connected < 192.168.0.33 HOST allan-1 ! Could not find Accounts File: c:\documents and settings\allan\desktop\ftp\ftpaccounts-allan-1.ini > 192.168.0.33 504 HOST unknown or not allowed. < 192.168.0.33 USER ics ! Opening Accounts File: c:\documents and settings\allan\desktop\ftp\ftpaccounts-default.ini > 192.168.0.33 331 Password required for ics. < 192.168.0.33 PASS ics ! 192.168.0.33=ics is authenticated ! 192.168.0.33=ics Home Directory: c:\temp\ > 192.168.0.33 230 User ics logged in. < 192.168.0.33 PWD > 192.168.0.33 257 "/" is current directory. < 192.168.0.33 FEAT > 192.168.0.33 211-Extensions supported: HOST SIZE REST STREAM MDTM MDTM MMDDHHMMSS[+-TZ] filename MLST size*;type*;perm*;create*;modify*; MFMT MD5 XCRC "filename" start end XMD5 "filename" start end CLNT SITE INDEX;ZONE;CMLSD;DMLSD MODE Z XCMLSD XDMLSD UTF8 LANG EN* OPTS MODE;UTF8; AUTH TLS;SSL; CCC PROT C;P; PBSZ 211 END < 192.168.0.33 CLNT ICS FTP Client V7.28 > 192.168.0.33 200 Noted OK. < 192.168.0.33 OPTS UTF8 ON > 192.168.0.33 200 UTF8 ON Ok. < 192.168.0.33 TYPE I > 192.168.0.33 200 Type set to I. < 192.168.0.33 SYST > 192.168.0.33 215 UNIX Type: L8 Internet Component Suite < 192.168.0.33 CWD /dsafebackftp/ > 192.168.0.33 250 CWD command successful. "/dsafebackftp" is current directory. < 192.168.0.33 PWD > 192.168.0.33 257 "/dsafebackftp" is current directory. < 192.168.0.33 PASV > 192.168.0.33 227 Entering Passive Mode (192,168,0,50,64,1). < 192.168.0.33 XDMLSD -R > 192.168.0.33 150 Opening data connectio