
August 15th, 2003, 06:05 PM
|
 |
Last Day: May 28, 2005
|
|
Join Date: Jul 2003
Location: Maryland
|
|
|
You need to learn IPC
Inter-Process Communication is needed for something like what you are looking for, such as servers that listen on ports for requests, then carry them out. You will need a program that stays in memory call to call and can deal with multiple simultaneous calls. This not a trivial exercise and there are many ways to approach it. You could, for instance, have your 'server' (i.e., FTP manager) look for a file in a particular directory with some sort of information, then act on that information and delete the file. This, of course, requires that the process that writes the files (the one requesting the FTP service) does not overwrite other requests by different programs. It is a challenge to get it to work well in a low demand environment and very tricky to get right in a high demand environment. I prefer the socket approach because the OS will handle a lot of the queueing of the connections and if you don't have too much demand (say no more often than it takes to actually transfer your FTP files) then you don't even need to open up the can of worms called threading. Unless you are really having performance issues, I suggest you worry about something else. If this is really an issue, I would devote a large part of my effort to 'emulating' the FTP requests and see if there wasn't a way arround the need for it in the first place.
Good Luck!
__________________
Left DevShed May 28, 2005. Reason: Unresponsive administrators.
Free code: http://sol-biotech.com/code/.
Secure Programming: http://sol-biotech.com/code/SecProgFAQ.html.
Performance Programming: http://sol-biotech.com/code/PerformanceProgramming.html.
It is not that old programmers are any smarter or code better, it is just that they have made the same stupid mistake so many times that it is second nature to fix it.
--Me, I just made it up
The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man.
--George Bernard Shaw
|