On Mon, Oct 23, 2017 at 10:25 AM, Matt Mueller <mattmue...@gmail.com> wrote:
>
> Ah thanks guys for the insights, this led me to do some more digging:
>
> http://man7.org/linux/man-pages/man2/listen.2.html
> http://man7.org/linux/man-pages/man2/accept.2.html
>
> - Looks like Listen() creates a socket and a backlog queue.
> - When you call Dial(), the connection request gets stored in that backlog
> - When you call Accept(), the connection gets dequeued and a new socket is
> made for that connection
>
> What I still don't quite understand is, what happens to the written bytes
> between Listen() and Accept()? Do they get buffered in that backlog queue as
> well?

No, they are stored in the socket's buffer.  The backlog queue is a
queue of sockets.

Ian

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to