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? Matt On Sunday, October 22, 2017 at 5:07:49 PM UTC+7, Ayan George wrote: > > > > On 10/22/2017 06:06 AM, Ayan George wrote: > > > > > > buf := make([]byte, 0, 20) > > > > Sorry -- I meant: > > buf := make([]byte, 20) > > > -- 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.