Greetings,

after checking Stevens, Google etc. and not finding an answer, I try it 
here: when doing a non-zero sized send() on a socket in state 
CLOSE_WAIT, what is the expected result? My test program shows me the 
"success" for i.e. a send of 128 bytes for a standard Ethernet-based socket.

Our socket implementation, however, uses direct remote memory access 
(using our own interconnect hardware), and closes this connection if one 
end closes the socket. This results in a send() on this socket (which 
still is in CLOSE_WAIT, though) return EPIPE (plus SIGPIPE signal).

send(3SOCKET) says conc. the return values:
      EPIPE    The socket is shut down for writing, or the  socket
               is  connection-mode  and is no longer connected. In
               the  latter  case,  if  the  socket  is   of   type
               SOCK_STREAM, the SIGPIPE signal is generated to the
               calling thread.

Does this apply here?

The alternative would be to just accept&forget the data and return 
success, but do not like the though of just accepting data that will 
never be delivered.

The behaviour on close() with respect to SO_LINGER is a different 
aspect, right?

  Joachim

-- 
Joachim Worringen, Software Architect, Dolphin Interconnect Solutions
phone ++49/(0)228/324 08 17 - http://www.dolphinics.com
_______________________________________________
networking-discuss mailing list
[email protected]

Reply via email to