NetworkClientLibrary.
Remarks
Resolved viaregisterEnv(ClientConfigNetwork, ctx.env) during __init.
Extends
Constructors
Constructor
new ClientConfigNetwork(): ClientConfigNetwork
Returns
ClientConfigNetwork
Inherited from
NetworkConfig.constructor
Properties
ICE_SERVERS
ICE_SERVERS: RTCIceServer[]
Defined in: modules/network/src/shared/config.network.ts:67
STUN and TURN servers used while gathering ICE candidates.
Remarks
Used by both the client and the server peer connection. A STUN entry lets a peer behind a NAT discover its own public address, and a TURN entry relays traffic when no direct path exists — typically a client on a network that blocks UDP. Accepts a comma-separated list ofstun:/turn: URLs, or a JSON array of
RTCIceServer objects. Use the JSON form for TURN: credentials must be
given as separate username/credential fields, since they cannot be
embedded in the URL. Invalid values are rejected at startup rather than
failing on the first client connection.
Default
Example
Inherited from
NetworkConfig.ICE_SERVERS
NETWORK_MODE
NETWORK_MODE:Defined in: modules/network/src/shared/config.network.ts:78"dedicated"|"p2p"
p2p when the game’s nanoforge.config.ts sets network: "p2p": the
server app runs in the host player’s browser. Set by the nf CLI.
Default
Inherited from
NetworkConfig.NETWORK_MODE
SERVER_ADDRESS
SERVER_ADDRESS: string
Defined in: modules/network/src/client/config.client.network.ts:45
Hostname or IP address of the game server.
SERVER_TCP_PORT?
Defined in: modules/network/src/client/config.client.network.ts:29 Port of the server’s TCP WebSocket endpoint.optionalSERVER_TCP_PORT?:string
Remarks
Either this orSERVER_UDP_PORT (or both) must be set.
SERVER_UDP_PORT?
Defined in: modules/network/src/client/config.client.network.ts:40 Port of the server’s UDP (WebRTC signaling) endpoint.optionalSERVER_UDP_PORT?:string
Remarks
Either this orSERVER_TCP_PORT (or both) must be set.
WSS
WSS: boolean
Defined in: modules/network/src/client/config.client.network.ts:56
Use secure WebSocket (wss://) connections.