Jenna Magius is a user on octodon.social. You can follow them or interact with them if you have an account anywhere in the fediverse. If you don't, you can sign up here.

Why the fuckass does TcpListener return a (TcpStream, SocketAddr).

The remote addr is baked into the TcpStream. You can just get it... at any time.

And like, I get that this comes from the Berkeley sockets API, but why the hell was the Berkeley sockets API even like this?

Jenna Magius @jennamagius

"accept() first appeared in 4.2BSD" "getpeername() first appeared in 4.2BSD"

· Web · 0 · 0