[Search for users]
[Overall Top Noters]
[List of all Conferences]
[Download this site]
Title: | DEC TCP/IP Services for OpenVMS |
Notice: | Note 2-SSB Kits, 3-FT Kits, 4-Patch Info, 7-QAR System |
Moderator: | ucxaxp.ucx.lkg.dec.com::TIBBERT |
|
Created: | Thu Nov 17 1994 |
Last Modified: | Fri Jun 06 1997 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 5568 |
Total number of notes: | 21492 |
5231.0. "What conditions constitute an exception w select()" by CSC32::D_SANFORD () Sat Feb 15 1997 15:05
UCX any version, DEC C V5.5, OpenVMS VAX V6.1
The socket routine select() allows one to check sockets for pending
exceptions. What conditions constitute an exception to the select
routine? A broken socket doesn't seem to be an exception and I
thought it would be.
He sets socket options SO_REUSEADDR, SO_KEEPALIVE, and
UCX$C_TCP_PROBE_IDLE. It's not that we don't detect broken sockets,
but that we detect them in the read handler.
If you look at the select() function, it specifies and returns three
masks, one for reads, one for writes, and one for exceptions. When a
peer disconnects a socket (or when a connection times out, for that
matter), select sets a bit for the socket in the read mask. When I
read from the socket, the read indicates an error and I handle it at
that point.
The documentation for select() states:
"On return, the longword exceptfds pointer contains a bit mask
of the sockets that have exceptions pending."
I have never seen a bit set in the exception mask. I would like to
know what constitutes an exception and under what conditions select()
sets a bit in the exception mask.
Regards, Drew Sanford
Customer Support Center
RE: C970214-3869
T.R | Title | User | Personal Name | Date | Lines |
---|
5231.1 | | NETRIX::thomas | The Code Warrior | Sat Feb 15 1997 22:13 | 1 |
| execption is only set when there's oob data pending.
|