API reference
GDOnlineMatch
Directory that records rooms and identity gateways per game and returns a destination. It does not relay game traffic.
Methods
handle(req: GDWebRequest) -> GDWebResponse, Errlisten(port: int, host: String = "127.0.0.1") -> Variant, Errport() -> intstop() -> void
handle
handle(req: GDWebRequest) -> GDWebResponse, ErrAnswer one matchmaking request.
Answer a matchmaking request as a web application handler, returning a value and Err.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
req | GDWebRequest | Required | Current HTTP request supplied to the middleware or handler. |
Return value
GDWebResponse, Err
Errors
The result carries a value and an Err. Check the error before using the value; a failure may retain partial progress. In a function returning value, Err, use ? to propagate failure to the caller. The ! operator terminates the program on failure; in serve it fails the current handler.
listen
listen(port: int, host: String = "127.0.0.1") -> Variant, ErrServe every path from a web application owned by this endpoint.
Start the matchmaking HTTP listener, returning a value and Err.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
port | int | Required | Network port number. A listening port of zero lets the OS select a port. |
host | String | "127.0.0.1" | Hostname or IP address used for connecting or binding. |
Return value
Variant, Err
Errors
The result carries a value and an Err. Check the error before using the value; a failure may retain partial progress. In a function returning value, Err, use ? to propagate failure to the caller. The ! operator terminates the program on failure; in serve it fails the current handler.
port
port() -> intReturn the port opened by listen(), or 0 before it.
Return the listening port, or zero before listen.
Parameters
No parameters.
Return value
int
Errors
This call has no Err return slot. Its return type and documented sentinel values determine how to inspect the result.
stop
stop() -> voidStop the server opened by listen().
Stop the listener.
Parameters
No parameters.
Return value
void
No value is returned.
Errors
This call has no Err return slot. Its return type and documented sentinel values determine how to inspect the result.