Skip to main content

Module server_sockets

Module server_sockets 

Source

Enumsยง

HandshakeError ๐Ÿ”’
Represents possible errors that can occur during the client handshake phase.

Functionsยง

activate_socket
Binds the TCP server socket to the specified port and spawns the main incoming connection listener loop.
check_version_compatibility ๐Ÿ”’
Validates the initial handshake packet sent by a newly connected client.
handle_client ๐Ÿ”’
Orchestrates the lifecycle of an individual client connection.
handle_messages ๐Ÿ”’
Routes general, authorized client messages to appropriate engine functions or command handlers.
read_thread ๐Ÿ”’
Continuously reads, deserializes, and processes incoming messages from an active client connection.
update_login_status ๐Ÿ”’
Evaluates authentication-related client messages (Login, Relogin, Logout) and updates global session states (via return).
write_thread ๐Ÿ”’
Manages outgoing data serialization and transmission to the client on a dedicated background thread.