logoalt Hacker News

slopinthebag • today at 6:41 PM • 1 reply • view on HN

or

   struct Connected { peer_ip: u32 }
   struct Disconnected;
   struct Connection<State> { state: State }

Replies

sendfoods • today at 7:13 PM

Wouldn’t peer: Option<int32> be enough to represent this?

None = disconnected

➕ show 3 replies