ENet over UDP, used directly through ENetConnection, with a handshake before a connection counts as a player. - NetProtocol: HELLO, WELCOME and REJECT layouts, the protocol version, name cleaning, the reasons a connection ends and a sentence for the player about each. Decoders return nothing for malformed input and never raise an error. - NetServer: listens, takes each guest through the handshake, and reports joined, left and refused. It refuses a different protocol version, a full server, a malformed HELLO and a guest that stays silent, each with its own reason. Handles are never reused; duplicate names get a number. - NetClient: connects, introduces itself, and ends up joined or closed with a reason. Leaving says goodbye so the server knows at once; a client that vanishes is dropped by ENet's timeout. - Tests run a real server and clients over loopback UDP, with bare ENet peers sending malformed and random packets. The headless server doesn't listen yet; N2 connects this to the match. Closes #32 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2 lines
20 B
Plaintext
2 lines
20 B
Plaintext
uid://cnttr6v30diwi
|