comp.lang.ada
 help / color / mirror / Atom feed
From: Caffeine Junky <nospam@hotmail.com>
Subject: Re: Question on Client - Server communication
Date: Sat, 06 Jul 2002 01:06:45 GMT
Date: 2002-07-06T01:06:45+00:00	[thread overview]
Message-ID: <ForV8.251229$R61.97042@rwcrnsc52.ops.asp.att.net> (raw)
In-Reply-To: mailman.1025856482.6739.comp.lang.ada@ada.eu.org

On Fri, 05 Jul 2002 04:08:18 -0400, 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).

Use port "forwarding". Very simple.

The server designates a standard port. The application connects to the
server on that port. The server then tells the application to switch to
port number X and opens a connection on that port. This leaves the
original port open to recieve more app requests. There are alot of
servers that do this. Check out thier source code.

Apache comes to mind.


St4pL3



  parent reply	other threads:[~2002-07-06  1:06 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
2002-07-06 23:19   ` Robert A Duff
2002-07-07  1:14     ` David C. Hoos, Sr.
2002-07-06  1:06 ` Caffeine Junky [this message]
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