All checks were successful
Build and Deploy / build-linux (push) Successful in 1m11s
Build and Deploy / build-windows (CLANG64) (push) Successful in 13m30s
Build and Deploy / package-dist (push) Has been skipped
Build and Deploy / deploy-itch (push) Has been skipped
Build and Deploy / deploy-gitea (push) Has been skipped
1.0 KiB
1.0 KiB
enet
initialize() function
Initialize the ENet library. Must be called before using any ENet functionality. Throws an error if initialization fails.
Returns: None
deinitialize() function
Deinitialize the ENet library, cleaning up all resources. Call this when you no longer need any ENet functionality.
Returns: None
create_host(address) function
Create an ENet host for either a client-like unbound host or a server bound to a specific address and port:
- If no argument is provided, creates an unbound "client-like" host with default settings (maximum 32 peers, 2 channels, unlimited bandwidth).
- If you pass an "ip:port" string (e.g. "127.0.0.1:7777"), it creates a server bound to that address. The server supports up to 32 peers, 2 channels, and unlimited bandwidth.
Throws an error if host creation fails for any reason.
omit to create an unbound client-like host.
address: (optional) A string in 'ip:port' format to bind the host (server), or
Returns: An ENetHost object.