API ReferenceGE Extensionscore
Scheme Command Server
UDP listener for `beamng:` URI scheme commands (obsolete - replaced by Windows pipe).
UDP listener for beamng: URI scheme commands (obsolete - replaced by Windows pipe).
Overview
Extension: core_schemeCommandServer - Opens a UDP socket on 127.0.0.1:22137 to receive beamng: scheme commands from external sources (e.g. browser links). Forwards valid commands to commandhandler.onSchemeCommand(). Marked as obsolete - the default scheme handler now uses a Windows named pipe.
Public Functions
| Function | Description |
|---|---|
M.onFirstUpdate() | Opens the UDP socket on port 22137 |
M.onUpdate() | Polls the socket for incoming data each frame |
Protocol
- Listens on
127.0.0.1:22137(UDP) - Expects messages starting with
beamng: - Strips the
beamng:prefix and passes the remainder tocommandhandler.onSchemeCommand()
Usage Example
-- External process sends UDP to localhost:22137
-- Message: "beamng:loadSnapshot/abc123"
-- Results in: commandhandler.onSchemeCommand("loadSnapshot/abc123")Notes
- Socket timeout is 0 (non-blocking)
- If the port is unavailable, the socket silently fails to open
- This module is obsolete but still loaded for backwards compatibility
See Also
- Snapshot - Snapshot scheme command handler