Article View: comp.unix.programmer
Article #26Re: Stream socket client/server connection problems
From: Barry Margolin
Date: Fri, 30 Oct 1992 00:13
Date: Fri, 30 Oct 1992 00:13
20 lines
1526 bytes
1526 bytes
In article <1992Oct29.201303.16217@brtph560.bnr.ca> rmcash@eos.ncsu.edu (Rob Cash) writes:
>I have a question for you concerning establishing stream socket connections
>without using a reserved port from the /etc/services file. Basically, the
>question is: how can the client determine the server's port, if the server's
>port was assigned automatically by the operating system because s_port was 0?
You need some common communication mechanism to bootstrap things. If the
server's system runs a port mapper, the server could register his port with
the port mapper and the client could contact it. You then rely on the fact
that the port mapper has a well-known port.
It's analogous to the real world telephone system: some services have
well-known phone numbers (e.g. 911 for emergencies), but to find other
phone numbers you have to call Directory Assistance (at the well-known
number 411).
--
Barry Margolin
System Manager, Thinking Machines Corp.
barmar@think.com {uunet,harvard}!think!barmar
Technical Details
Message-ID:
<1cpunuINN92q@early-bird.think.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!think.com!barmarReferences:
<1992Oct29.201303.16217@brtph560.bnr.ca>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!think.com!barmar From: barmar@think.com (Barry Margolin) Newsgroups: comp.unix.programmer,comp.unix.wizards Subject: Re: Stream socket client/server connection problems Date: 30 Oct 1992 00:13:50 GMT Organization: Thinking Machines Corporation, Cambridge MA, USA Lines: 20 Message-ID: <1cpunuINN92q@early-bird.think.com> References: <1992Oct29.201303.16217@brtph560.bnr.ca> NNTP-Posting-Host: telecaster.think.com Keywords: socket, client/server, /etc/services