netdev
[Top] [All Lists]

Re: TCP: sendmsg/recvmsg/ioctl(SIOCINQ/SIOCOUTQ)

To: "James R. Leu" <jleu@xxxxxxxxxxxxxx>
Subject: Re: TCP: sendmsg/recvmsg/ioctl(SIOCINQ/SIOCOUTQ)
From: John Heffner <jheffner@xxxxxxx>
Date: Thu, 11 Jan 2001 22:19:50 -0500 (EST)
Cc: netdev@xxxxxxxxxxx
In-reply-to: <20010111174726.A29707@doit.wisc.edu>
Sender: owner-netdev@xxxxxxxxxxx
On Thu, 11 Jan 2001, James R. Leu wrote:

> > For sendmsg/recvmsg you _want_ the kernel to wait for the connection
> > attempt to complete if we are in SYN_SENT or SYN_RECV.  If this is not
> > what is happening (the socket is some other kind of "closed") you will
> > get an EPIPE (and perhaps a SIGPIPE signal) back.  This is all done
> > via wait_for_tcp_connect in net/ipv4/tcp.c
> 
> In the code I see how sendmsg/recvmsg end up returning -EPIPE if the local
> side has been shutdown (sk->shutdown & SEND_SHUTDOWN).   What should I expect
> if I close down the remote side of the socket?

If the other end has closed, you will get a -EPIPE from
wait_for_tcp_connect().

  -John


<Prev in Thread] Current Thread [Next in Thread>