From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,3190aba277f0ce3e X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-07-05 03:00:04 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!fr.usenet-edu.net!usenet-edu.net!ciril.fr!news.cs.univ-paris8.fr!u-psud.fr!news.crihan.fr!univ-lille1.fr!news.cict.fr!news.laas.fr!not-for-mail From: Fabien Garcia Newsgroups: comp.lang.ada Subject: Re: Question on Client - Server communication Date: Fri, 05 Jul 2002 11:48:02 +0200 Organization: LAAS-CNRS, Toulouse, France Message-ID: <3D256B52.5050608@laas.fr> References: NNTP-Posting-Host: pppport14.laas.fr Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: kane.laas.fr 1025862471 25259 140.93.18.115 (5 Jul 2002 09:47:51 GMT) X-Complaints-To: abuse@laas.fr NNTP-Posting-Date: 5 Jul 2002 09:47:51 GMT User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr-FR; rv:0.9.4.1) Gecko/20020508 Netscape6/6.2.3 X-Accept-Language: fr-fr Xref: archiver1.google.com comp.lang.ada:26868 Date: 2002-07-05T09:47:51+00:00 List-Id: hi, This is indeed an old problem of communication, just as you need to know the phone number of a person you want to talk to, you need the pair of the application you want to talk to. Most applications use fixed port (in which case you have only one application server on each computer) like FTP and HTTP do. An other way if you want several application servers on a computer (which seems to be your case) is to make a directory server. I think the best way to handle this is to have a directory server on each machine that waits on a known port (say S_PORT), each time an application starts, it sends the port it is using to the local server (through a connection to port S_PORT) and then close the connection. When an application stops, it send a resignation message to the server to. In order to avoid problems with server crashs, the server as to write its configuratio in a file so as not to lose everithing. each tome application A on computer Ca wants to talk to application B on computer Cb, it contacts the remote server on Cb and asks for the port used by application B. This solution make the hypothesis that an application knows the computer on which the remote application runs, if this is not the case, you have to make a global server to handle all the associations . I hope this will be usefull, however I do not have any code that does this. Fabien Garcia