comp.lang.ada
 help / color / mirror / Atom feed
From: Thierry Lelegard <thierry.lelegard@canal-plus.fr>
Subject: Re: Question on Client - Server communication
Date: Fri, 05 Jul 2002 16:58:40 +0200
Date: 2002-07-05T16:58:40+02:00	[thread overview]
Message-ID: <3D25B420.27D9D78B@canal-plus.fr> (raw)
In-Reply-To: mailman.1025856482.6739.comp.lang.ada@ada.eu.org

Preben Randhol wrote :
> 
> I'm doing a small program to learn a bit about socket programming with
> clients and servers. Besides I need the program.
> 
> What I want is an application that can talk to the same application
> running on a different machine. This is ok and no problem. However I
> cannot know the port the application is listening to (there may be
> several users runnig the same application on the same machine).
> Therefore in order to contact the other application I need a server
> running on each machine with a known port number. Then I can do this (_A
> = on machine A, _B on machine B): App_A contacts Server_B which tells
> App_B to contact App_A on port XXXX. So Server_B will only deliver this
> message to App_B and not the whole stream between the two. Does this
> seem like a OK way to do this? Or is there a better way using socket
> programming (not GLADE).

What you describe already exists, this is the portmapper server (port 111).

We have the same problem as you and we use the portmapper for all
our applications.

A portmapper exist on all UNIXen and VMS. For Windows (a so-called OS
which does nothing like the others), we are written a simple portmapper
daemon. Writing a portmapper daemon is trivial. The only tricky part (on
both client and server side) is the underlying protocol based on Sun RPC
and XDR.

See the following references:

RFC 1057 : RPC, Remote Procedure Call Protocol Specification, Version 2
(Appendix A describes the Portmapper interface).

RFC 1014 : XDR, External Data Representation Standard.

-Thierry



  parent reply	other threads:[~2002-07-05 14:58 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-05  8:08 Question on Client - Server communication Preben Randhol
2002-07-05  9:23 ` John R. Strohm
2002-07-05  9:48 ` Fabien Garcia
2002-07-05 10:05   ` Lutz Donnerhacke
2002-07-05 12:47     ` Fabien Garcia
2002-07-05 14:20       ` Lutz Donnerhacke
2002-07-05 10:09 ` John McCabe
2002-07-05 14:58 ` Thierry Lelegard [this message]
2002-07-06 23:19   ` Robert A Duff
2002-07-07  1:14     ` David C. Hoos, Sr.
2002-07-06  1:06 ` Caffeine Junky
2002-07-06 19:55   ` Preben Randhol
2002-07-07  2:37     ` Caffeine Junky
2002-07-16  6:32       ` Craig Carey
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox