Newsgroups : Borland : borland.public.delphi.internet.winsock : 2007 May : TCPserver/client update advice

www.cryer.info
Managed Newsgroup Archive

TCPserver/client update advice

Subject:TCPserver/client update advice
Posted by:"AntonE" (anto..@true.co.za)
Date:Fri, 18 May 2007 21:58:45

I've written my FIRST TCPserver/client program! (D6.2 ent, Indy10)
It is a network (multiple) calendar program that users update all the time
for doctors offices. It must run over the Internet(ADSL) for multiple
branches.
My TCPserver/client talks are strictly 'conversational', meaning the client
WriteLN a request & then knows what to expect in return. All good so far...

Now I want to tell all clients connected to the server if an appointment
have been added/edited/deleted as well as other stuff in the app, like
messages/notes. I do not want to have every client readln check for a
possible 'random' response from the server, so my first thought was to
create another TCPserver instance in the server-prog (port+1) and use that
exclusively for sending client messages, like 'mail arrived' or 'appointment
added' or whatever.

Out of this flows 3 questions:
1) Is it adviceable to do it in this way, then on the client have a thread
running with a TCPclient that constantly check every for a 'message' from
the server?
2) How do I thread-synchronize TCPserver/client stuff, like updating the
interface as the docs & samples I have is for Indy9 with a AThread variable
that is easily accessable?
3) How do I find all TCPserver connections so I can send a WriteLN to each
connected client?

Thanks everyone
AntonE
(Once you get it going) Indy rocks!

Replies:

www.cryer.info
Managed Newsgroup Archive