~/talk

Building a net Conn Type From the Ground Up

Talkat GopherCon UK 2019 · 2019-08-21..08-23· [go, networking]
slides:none on file

Implements a Linux AF_VSOCK net.Conn and net.Listener using raw BSD socket syscalls (socket, bind, connect, accept4), the golang.org/x/sys/unix package and OS newfile wrappers, integrates with the runtime network poll so non‑blocking I/O, deadlines and concurrent Close/Accept unblock correctly, and satisfies net.Error by translating syscall errors. Tests use x/net/nettest and the result serves HTTP and gRPC over AF_VSOCK successfully (works on Go 1.12+ with the accept4 raw‑read hook).

AI-written summary · about

  1. 0:00Intro
  2. 0:30Package net
  3. 0:58What is a "stream-oriented" connection?
  4. 1:56What about other socket types?
  5. 4:05The BSD Sockets API
  6. 5:03net. Addr and net. Conn interfaces
  7. 5:33net. Addr and net. Conn implementations
  8. 8:12The initial conn type
  9. 8:27net.Listener interface
  10. 10:44The initial listener type
  11. 12:09Non-blocking I/O
  12. 13:16How does the runtime network poller work?
  13. 14:29The runtime network poller in summary
  14. 14:53Accessing the runtime network poller
  15. 16:07os. NewFile with a non-blocking file
  16. 16:41Testing net.Conn compliance
  17. 17:08net. Error compliance
  18. 17:59Non-blocking accept4(2)
  19. 19:10Testing net.Listener compliance
  20. 22:26The possibilities are endless
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.