https://github.com/awman3703/cct-serverapi
https://github.com/awman3703/cct-serverapi
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/awman3703/cct-serverapi
- Owner: AwMan3703
- Created: 2025-02-25T15:00:44.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2025-02-25T15:36:42.000Z (3 months ago)
- Last Synced: 2025-02-25T16:32:52.390Z (3 months ago)
- Language: Lua
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# serverAPI
Standard library for low-level server stuff, so I can focus on processing and responding to messages.## Exported functions:
### `setup(` messageHandler `,` hostname `,` protocols `)`
Sets up the server
- `function` **messageHandler**: The function to that handles incoming messages.
It should take in 3 arguments: the sender's ID, the message itself and
the protocol it was sent under.
- `string` **hostname**: The hostname for the server
- `string[]` **protocols**: A list of protocols for the server to accept### `start(` strPreferredModem `)`
Actually starts the server
- `string` **preferredModem**: The modem to run the server out of. If none is specified, the first available modem will be opened and used.### `stop()`
> _Not yet implemented_Stops the currently running server