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