[erlang-questions] EPIPE and TCP sockets

Tony Garnock-Jones tonyg@REDACTED
Thu Oct 11 22:15:56 CEST 2007


Hi all,

If I understand correctly, the BSD sockets interface to TCP lets you 
know when a TCP socket is closed with outbound data unacknowledged, by 
sending the sender SIGPIPE (or returning EPIPE if SIGPIPE is blocked).

Is there a way of getting gen_tcp to let me know if a send is not fully 
completed at the time of socket close? (My initial experiments lead me 
to believe the answer is "no", and inspecting .../common/inet_drv.c's 
use of EPIPE tends to support that conclusion.)

The goal here is to be able to use TCP's reliable-delivery feature to 
get told if the socket closes while unacknowledged sent data exists.

Regards,
   Tony



More information about the erlang-questions mailing list