home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / unix / aix / 13729 < prev    next >
Encoding:
Text File  |  1993-01-27  |  1.8 KB  |  40 lines

  1. Newsgroups: comp.unix.aix
  2. Path: sparky!uunet!eagle!lebowits
  3. From: lebowits@eagle.bet.ibm.com (Steven Lebowitz)
  4. Subject: Socket Programming under AIX 3.2.2+
  5. Message-ID: <1993Jan26.211605.18861@eagle.bet.ibm.com>
  6. Date: Tue, 26 Jan 1993 21:16:05 GMT
  7. Organization: IBM FSD - Bethesda, Maryland
  8. Lines: 30
  9.  
  10.  
  11. I am writing my first socket application.  I have no experience with sockets
  12. under any operating system, and I just happen to be working under AIX right
  13. now.
  14.  
  15. I have both a "client" and a "server" process and they communicate with
  16. each other just fine.  The problem I have is that after the first run of
  17. my programs (sometimes the 3rd or 4th run), the server process seems to
  18. hang while reading the data from the socket.  A netstat shows the
  19. following:
  20.  
  21. > Active Internet connections
  22. > Proto Recv-Q Send-Q  Local Address          Foreign Address        (state)
  23. > tcp     2492      0  nova.bet.ibm.com.stimp nova.bet.ibm.com.1160  CLOSE_WAIT
  24. > tcp        0      0  nova.bet.ibm.com.1160  nova.bet.ibm.com.stimp FIN_WAIT_2
  25. > tcp        0      0  nova.bet.ibm.com.1159  nova.bet.ibm.com.stimp TIME_WAIT
  26. > tcp        0      0  nova.bet.ibm.com.1156  nova.bet.ibm.com.stimp TIME_WAIT
  27.  
  28. By the time I see this, the client process has exited after sending all of
  29. it's data to the server.  Notice that the Recv-Q is 2492 and that the socket
  30. is in a CLOSE_WAIT.
  31.  
  32. I have set the SO_LINGER option for the socket on the client side, and I was
  33. expecting that it would wait for all the data to be "digested" before
  34. exiting, however it just blasts out the data and quits.
  35.  
  36. Can anyone shed some light on what I might look for?  I am puzzled by the fact
  37. the the first couple of times I run the programs, they work perfectly.  It 
  38. is only after the first (or second or third) run that the server goes 
  39. casters up.
  40.