home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / protocol / tcpip / 5639 < prev    next >
Encoding:
Internet Message Format  |  1992-12-16  |  2.1 KB

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