Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!tut.cis.ohio-state.edu!ucbvax!RHINO.NCSL.NIST.GOV!tebbutt From: tebbutt@RHINO.NCSL.NIST.GOV (John Tebbutt) Newsgroups: comp.protocols.iso.dev-environ Subject: TNetListen and socket descriptors Message-ID: <9103191428.AA06588@rhino.ncsl.nist.gov> Date: 19 Mar 91 14:28:37 GMT Sender: daemon@ucbvax.BERKELEY.EDU Distribution: inet Organization: National Institute of Standards and Technology (NIST) Lines: 27 Robyne, Brien, Your exchange about TNetListen and socket descriptors caught my eye, but I don't really understand the problem or the solution, I'm afraid! >> My problem is I need to get the listen socket number after performing >> the TNetListen call. Pure curiosity: presumably you want to get the socket descriptor *before or without* a call to TNetAccept - why ? >Sure, but it is an ugly hack. Agreed! > /* Perform TNetListen. Socket allocated will be given the same file > desc just closed down */ >As I said, it is ugly, but it does work. What is it about the nature of sockets and the way descriptors are allocated that enables you to guarantee that this will be the case ? If this is the case normally, would it also work when setjmp() and longjmp() are used, as they are in ISODE ? Thanks in anticipation, JT