QuakeServer.Extensions.Web (quake_server v0.1.0)

Copy Markdown View Source

FTE's network builtins:

  • uri_get (513, also as uri_post) — an HTTP request: a GET, or with a MIME type a POST of the fourth argument (or of string buffer five's strings joined by the fourth). Returns 1 and runs the request apart; run/1 hands each reply to the program's URI_Get_Callback(id, code, data, length) with self as it was, the code 0 for HTTP 200 and the status otherwise (0 when there was no reply). Returns 0, printing why, while pr_enable_uriget is 0 or 32 requests are waiting.
  • netaddress_resolve (625) — an address as a.b.c.d:port ([v6]:port for IPv6, no port when it is 0), QLoopBack:port for internalserver or QLoopBack, the default port used when none is given; the empty string when it cannot be resolved or net_enabled is 0
  • sendpacket (242) — an out-of-band packet: the server holds no network sockets, so nothing is sent and it returns 0

Replies wait in a table belonging to the host's process (ext.uri_replies).

Summary

Functions

Run network builtin builtin.

Hand every reply that has come since the last call to the program's URI_Get_Callback, in the order they came.

Functions

call(s, arg2, argc)

@spec call(map(), integer() | String.t(), non_neg_integer()) :: map()

Run network builtin builtin.

run(s)

@spec run(map()) :: map()

Hand every reply that has come since the last call to the program's URI_Get_Callback, in the order they came.