Expand description
This module manages the TCP server and how/where the packets are managed/sent.
Modulesยง
- dispatch ๐
- The
dispatch
module contains functions that will change the state of the activeConnection
. Each function indispatch
corresponds not to a specific packet, but to a whole state. Each state has different packets, and a packet can be named the name but have different intent based on state. - packet
- This module abstracts away a Minecraft packet, so that it can be used in a simple and standardized way.
- slp
- The module accountable for making the Server List Ping (SLP) protocol.
Structsยง
- Connection ๐
- Object representing a TCP connection.
Enumsยง
- Connection
State ๐ - State of each connection. (e.g.: handshake, play, โฆ)
- NetError
Constantsยง
Functionsยง
- handle_
connection ๐ - Handles each connection. Receives every packet.
- handle_
packet ๐ - This function returns an appropriate response given the input
buffer
packet data. - human_
bytes ๐ - listen
- Listens for every incoming TCP connection.