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>
51 lines
1.1 KiB
Markdown
51 lines
1.1 KiB
Markdown
---
|
|
title: "enet"
|
|
type: docs
|
|
---
|
|
|
|
# enet
|
|
|
|
### initialize() <sub>function</sub>
|
|
|
|
|
|
Initialize the ENet library. Must be called before using any ENet functionality.
|
|
Throws an error if initialization fails.
|
|
|
|
|
|
|
|
**Returns**: None
|
|
|
|
|
|
### deinitialize() <sub>function</sub>
|
|
|
|
|
|
Deinitialize the ENet library, cleaning up all resources. Call this when you no longer
|
|
need any ENet functionality.
|
|
|
|
|
|
|
|
**Returns**: None
|
|
|
|
|
|
### create_host(address) <sub>function</sub>
|
|
|
|
|
|
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.
|
|
|