Socket Options & Go: Multiple Listeners, One Port

Benjamin Cane
6 min readApr 3
Photo of two wall sockets with a cat sticker on them
Photo by Sven Brandsma on Unsplash

The net package in the Go standard library abstracts away many low-level networking details, making it easy for Go developers to create complex applications. However, the standard library can confuse developers who want to explore more advanced networking features like setting socket options on listeners.

Benjamin Cane

Building payments systems at American Express. Author (https://amzn.to/3kuCFpz). Open-source contributor (https://github.com/madflojo).