Re: [twsocket] FTP Server example

2010-02-11 Thread David Rose
Hello Francois, many thanks. I'll have look. -- regards David Thursday, February 11, 2010, 4:00:36 PM, you wrote: >> Many thanks. Is there anything specific to running this component in a >> thread I need to be aware of (I'm aware of general thread principles) FP> Make sure your thread h

Re: [twsocket] FTP Server example

2010-02-11 Thread Francois PIETTE
Many thanks. Is there anything specific to running this component in a thread I need to be aware of (I'm aware of general thread principles) Make sure your thread has a message pump otherwise no event will be handled. Have a look at OverbyteIcssDll1.dpr sample project. It is a DLL using a threa

Re: [twsocket] FTP Server example

2010-02-11 Thread Angus Robertson - Magenta Systems Ltd
> Many thanks. Is there anything specific to running this component > in a thread I need to be aware of (I'm aware of general thread > principles) I've not used a thread for a server myself, but it's purely event driven so should be straight forward. Just don't try updating visual components or

Re: [twsocket] FTP Server example

2010-02-11 Thread David Rose
Hello Angus, Many thanks. Is there anything specific to running this component in a thread I need to be aware of (I'm aware of general thread principles) ARMSL> Unless you expect a performance issue, it's probably not worth the ARMSL> trouble. I think you're right. I won't do anything about i

Re: [twsocket] FTP Server example

2010-02-11 Thread Angus Robertson - Magenta Systems Ltd
> Can I create a thread and instantiate the FTPserver component > within that thread ? Will this help ? Yes, you can create the FTP server within a thread, but there are currently no ICS demos doing so. Unless you expect a performance issue, it's probably not worth the trouble. Angus -- To u

Re: [twsocket] FTP Server example

2010-02-11 Thread Arno Garrels
David Rose wrote: > Can I create a thread and instantiate the FTPserver component within > that thread ? Will this help ? Yes! -- Arno Garrels -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our we

Re: [twsocket] FTP Server example

2010-02-11 Thread David Rose
Hello Angus, ARMSL> If by exe you mean the same project and executable file, and you are not ARMSL> already using threads, then the two applications are totally related, ARMSL> only one will be running at a time. Yes, one delphi project producing one exe. ARMSL> Again you don't actually say

Re: [twsocket] FTP Server example

2010-02-10 Thread Angus Robertson - Magenta Systems Ltd
> I don't think I explained properly. The FTP server and Database are > completely unrelated except for the fact that they share the same > exe. If by exe you mean the same project and executable file, and you are not already using threads, then the two applications are totally related, only on

Re: [twsocket] FTP Server example

2010-02-10 Thread David Rose
Hello Angus, I don't think I explained properly. The FTP server and Database are completely unrelated except for the fact that they share the same exe. In an ideal world, they'd be two completely independent exe's but the spec of this program means that one exe has got to be both a database e

Re: [twsocket] FTP Server example

2010-02-09 Thread Angus Robertson - Magenta Systems Ltd
> ARMSL> Your server application also needs to take care with file > lock timeouts, > ARMSL> network timeouts, etc, to avoid blocking the main thread. > > Could you elaborate. I know very little about this subject. Provided you do not make database calls from any FTP server events, you will no

Re: [twsocket] FTP Server example

2010-02-09 Thread David Rose
ARMSL> Your server application also needs to take care with file lock timeouts, ARMSL> network timeouts, etc, to avoid blocking the main thread. Could you elaborate. I know very little about this subject. I just need the simplest way to act as a simple FTP server. I will be controlling both th

Re: [twsocket] FTP Server example

2010-02-02 Thread Francois PIETTE
If my main app (which contains an TFtpServer component) is working hard processing data and a client requests a large file, does the main app stop processing its data whilst the file is being sent ? There are two distincts things there: 1) hard processing 2) Sending large file Answers: 1) Whi

Re: [twsocket] FTP Server example

2010-02-02 Thread Arno Garrels
David Rose wrote: > If my main app (which contains an TFtpServer component) is working > hard processing data and a client requests a large file, does the > main app stop processing its data whilst the file is being sent ? No, it would not. However such an application should excecute the TFtpSer

Re: [twsocket] FTP Server example

2010-02-01 Thread Angus Robertson - Magenta Systems Ltd
> TFtpServer component will create a new thread for each client, and > each client will be handled in multiple instances of the same > procedure. The ICS FTP server does not create a thread for each client, all clients are handled using the same thread. Some commands that require potentially

Re: [twsocket] FTP Server example

2010-02-01 Thread Lester
David Rose wrote: You'll have to bare with my questions on this as this is a subject I don't really know yet. If my main app (which contains an TFtpServer component) is working hard processing data and a client requests a large file, does the main app stop processing its data whilst the file

Re: [twsocket] FTP Server example

2010-02-01 Thread David Rose
AG> Only if socket IO actually was a bottleneck it might make sense AG> to use a different thread design, something like around 100 AG> clients per thread, for example. You'll have to bare with my questions on this as this is a subject I don't really know yet. If my main app (which contains

Re: [twsocket] FTP Server example

2010-02-01 Thread Francois PIETTE
Ok, thanks, but is there any reason why the processing of the delivery of the file takes place in the OnTerminate event, rather than at the end of the execute method i.e after the call to the lengthy process. OnTerminate event is handled in the context of the calling thread, that is the threa

Re: [twsocket] FTP Server example

2010-02-01 Thread Arno Garrels
David Rose wrote: > Ok, thanks, but is there any reason why the processing of the > delivery of the file takes place in the OnTerminate event, rather > than at the end of the execute method i.e after the call to the > lengthy process. The component (derived from TWSocketServer) is designed to ru

Re: [twsocket] FTP Server example

2010-02-01 Thread David Rose
Hello Francois, Ok, thanks, but is there any reason why the processing of the delivery of the file takes place in the OnTerminate event, rather than at the end of the execute method i.e after the call to the lengthy process. -- regards David Thursday, January 28, 2010, 4:56:24 PM, you wro

Re: [twsocket] FTP Server example

2010-01-28 Thread Francois PIETTE
I've been looking at the FTPServ1 sample app and I don't quite understand the worker thread part of the Getprocessing routine . Why is the data sent in the OnTerminate event rather than the execute method ? The idea is to have the FTP server trigger some lengthy processing (here a simple 10 s

[twsocket] FTP Server example

2010-01-27 Thread David Rose
I've been looking at the FTPServ1 sample app and I don't quite understand the worker thread part of the Getprocessing routine . Why is the data sent in the OnTerminate event rather than the execute method ? regards David David Rose