home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.programmer
- Path: sparky!uunet!newshost!root
- From: bmehlman@trirex.com(Ben Mehlman)
- Subject: Determining what ports are unused at run-time???
- Message-ID: <1992Nov16.221540.1940@Trirex.COM>
- Sender: root@Trirex.COM (Operator)
- Reply-To: bmehlman@trirex.com
- Organization: Trirex Systems Inc.
- Date: Mon, 16 Nov 1992 22:15:40 GMT
- Lines: 21
-
-
- I have an application in which a number of processes are running on either
- the same or different machines. Each of these processes will be accepting
- connections on some port. The process binds a socket to its port, and
- then reports the port number to a central process listening on a well
- known port.
-
- The question is: How do I assign the port numbers at run time? Right now
- Each process is manually assigned a known free port when it starts up. I
- would like instead for it to somehow determine what is a good port on that
- machine, and use it.
-
- Any suggestions would be greatly appreciated.
- Thanks!
- --
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- \|/ Ben Mehlman Indigo..
- ^ ^ Trirex Systems Inc
- # # bmehlman@trirex.com Indigoing..
- @
- \___/ >NeXTMail Welcome< Indigone.
-