home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / unix / programm / 5304 < prev    next >
Encoding:
Text File  |  1992-11-17  |  1.3 KB  |  33 lines

  1. Newsgroups: comp.unix.programmer
  2. Path: sparky!uunet!newshost!root
  3. From: bmehlman@trirex.com(Ben Mehlman)
  4. Subject: Determining what ports are unused at run-time???
  5. Message-ID: <1992Nov16.221540.1940@Trirex.COM>
  6. Sender: root@Trirex.COM (Operator)
  7. Reply-To: bmehlman@trirex.com
  8. Organization: Trirex Systems Inc.
  9. Date: Mon, 16 Nov 1992 22:15:40 GMT
  10. Lines: 21
  11.  
  12.  
  13. I have an application in which a number of processes are running on either  
  14. the same or different machines.  Each of these processes will be accepting  
  15. connections on some port.  The process binds a socket to its port, and  
  16. then reports the port number to a central process listening on a well  
  17. known port.
  18.  
  19. The question is: How do I assign the port numbers at run time?  Right now  
  20. Each process is manually assigned a known free port when it starts up.  I  
  21. would like instead for it to somehow determine what is a good port on that  
  22. machine, and use it.
  23.  
  24. Any suggestions would be greatly appreciated.
  25. Thanks!
  26. --
  27. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
  28.     \|/        Ben Mehlman                      Indigo..
  29.    ^   ^       Trirex Systems Inc      
  30.    #   #       bmehlman@trirex.com                   Indigoing..
  31.      @
  32.    \___/       >NeXTMail Welcome<                           Indigone.
  33.