home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!noc.near.net!transfer.stratus.com!sw.stratus.com!wendy
- From: wendy@sw.stratus.com (Wendy McNaughton)
- Newsgroups: comp.protocols.tcp-ip
- Subject: Re: TLI: t_accept returns TLOOK (why?)
- Date: 16 Dec 1992 15:26:20 GMT
- Organization: Stratus Computer, Inc.
- Lines: 36
- Distribution: world
- Message-ID: <1gnhqsINN1d2@transfer.stratus.com>
- References: <1992Dec2.215556.25482@bnrmtl.bnr.ca> <1992Dec6.034541.7626@phx.mcd.mot.com>
- NNTP-Posting-Host: cowabunga.sw.stratus.com
-
- > In article <1992Dec2.215556.25482@bnrmtl.bnr.ca> kenneth@bnr.ca (Ken Rosenfeld) writes:
- > >I'm writing a server using the TLI library for TCP
- > >(on a Sun).
- > >
- > >The server executes the following in a loop:
- > >
- > > t_listen(listenfd, ...) /* receive connect indication */
- > >
- > > t_accept(listenfd, newfd, ...) /* accept the call */
- > >
- > >There is a case where this code does not work: Two clients
- > >make connect requests before the server executes the t_listen().
- > >The t_listen() then receives the first connect indication.
- > >The t_accept() fails, however, with t_errno = TLOOK.
- > >A subsequent call to t_look() returns the T_LISTEN event.
- > >
-
- I ran into the same situation here with our SVR4-based UNIX (FTX).
- Our RPC implementation always assumes that if t_accept() fails
- with t_errno = TLOOK, it is as a result of a disconnect (and therefore
- calls t_rcvdis). As Mat Cucuzella pointed out, this is consistent with
- the examples in Stevens' UNIX Network Programming book. I also found
- similar examples in the AT&T SVR4 manuals.
-
- The consensus here seemed to be that this is incorrect behaviour for
- t_accept. It seems silly to interrupt one connection establishment
- just to process another. Since we have access to the sources, we were
- thinking of modifying our TLI library such that the t_accept call will
- not be interrupted by another connection request. This seems to work
- well but was wondering if this is the proper thing to do.
-
- --
- Wendy McNaughton | wendy@sw.stratus.com
- Stratus Computer, Inc. | Wendy_McNaughton@vos.stratus.com
- 55 Fairbanks Blvd.
- Marlboro, MA 01752
-