views:

214

answers:

2

I've done a brief Google around and found nothing but I feel I ought to ask. I'm not really expecting there to be anything, but would rather ask a question with no answers now than ask the question when it's all going wrong and discover that EVERYONE knew about a 'gotcha'...!

To make overall support/development life easier (and to bring-in madExcept etc), I'm about to take a semi-GUI app written in D5 (using NativeDB to connect to ASA6) and port it to D2007, eventually to turn it into a console app and/or a service. (The present GUI is little more than than a glorifed start/stop button and an activity log).

It's a classic TServerSocket application, listening on a specified port and running-off to do various things when clients connect. I'm not expecting any huge problems with the NativeDB side of things, but I wondered if there were any changes (bug fixes, improvements) between D5 and D2007 as far as TServerSocket goes?

We don't use blocking sockets, Indy etc - it's just TServerSocket from the scktcomp unit, straight out of the D5 Enterprise box. I'm not looking to change the code significantly unless there is something very wrong with TServerSocket under D2007. :-)

+6  A: 

I think TServerSocket still ships, but isn't installed by default any more. No other gotchas that I know about.

Since these components are deprecated, you might want to look at moving to Indy, ICS or Synapse in the longer term.

Bruce McGee
Thanks Bruce. I'll have a look at your suggestions - I'm not familiar with the other 2 but I've used older versions of Indy in small doses. I don't know if Indy can do non-blocking sockets, but if not then maybe one of the others will. Many thanks!
robsoft
Indy and Synapse are both blocking. ICS is not.
Bruce McGee
Thanks Bruce - I'll look at ICS. Do you know if there's a reason for TServerSocket being deprecated - it is just that people tend to use Indy out the box now instead? Regardless - appreciate your help, thanks!
robsoft
Bruce McGee
Thanks Bruce - that certainly makes sense. The ICS solution looks like it's a good way to go without having to rethink the sync/async nature of the overall code. Nice one, thank you.
robsoft
+1  A: 

Implementing a command line application with ICS and TServerSocket / TClientSocket might require to create an invisible window, because these components use windows messages for asynchronous operation. I have not tried it myself yet, but maybe it is documented in the ICS or sckcomp examples or sources.

mjustin