Skip to content

Deployment

optional caps?: object

optional kbPerSec?: number

data going out to its players, KB a second (over the last second); over it, new sockets wait (busy) and open rooms carry on

optional players?: number

connected sockets at once

optional rooms?: number

open rooms at once (default: the hub’s maxRoomsPerScope)


id: string

public id, as in the page’s script tag: letters, digits, “_” and “-”, 3 to 64


origins: string[]

sites allowed to use it: “https://mygame.example”, “https://mygame.example:8443”, one level of wildcard subdomain (“https://.mygame.example”) or any port (“:”). http works only for localhost, 127.0.0.1 and [::1] (“http://localhost:*” to test from a laptop); an http entry for any other host never matches.


optional revoked?: boolean

turned off: new sockets are refused (call revoke() to close its open rooms too)