New Hugo site in website/ with prosperon.dev theme (blue/gold/castle aesthetic), docs sidebar navigation, and content pages. Rewrote all doc files to align with the actual codebase: compositor+film2d rendering, use() modules (no global prosperon object), Pit language, script+JSON entity model. Added entities.md, front matter to all 70+ API docs, and updated API index for current module architecture. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1.1 KiB
1.1 KiB
title, type
| title | type |
|---|---|
| enet | docs |
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.