JamServer

Inherits: Node < Object

A Node that provides server-specific multiplayer capabilities as the child of a JamConnect Node

Properties

Dictionary

peer_usernames

{}

bool

dev_mode

false

bool

has_dev_keys

false

JamCallbackApi

callback_api

JamDataApi

data_api

String

session_id

"unset"

JamConnect

_jc

Methods

void

_ready ( )

void

_notification ( Variant what )

void

server_start ( Dictionary args )

void

_auth_callback ( int peer_id, PackedByteArray data )

JamError

_check_auth ( String username, String join_token )

void

_on_peer_connect ( int peer_id )

void

_on_peer_disconnect ( int pid )

void

shut_down ( bool do_disconnect=true )

void

_setup_local_dev_keys ( )

Variant

_fetch_local_dev_keys ( )


Constants

MAX_CLIENTS = 100

There is currently no description for this constant. Please help us by contributing one!

DEFAULT_PORT = 7437

There is currently no description for this constant. Please help us by contributing one!


Property Descriptions

Dictionary peer_usernames = {}

A dictionary mapping peer id ints to username Strings


bool dev_mode = false

True if the server is in developer mode. In developer mode, the clients are not verified and dummy API implementations are used instead of the AWS-driven implementations.


bool has_dev_keys = false

True if the local dev mode server has keys for accessing server APIs like Data and Callback


JamCallbackApi callback_api

A callback API client for communicating back to Jam Launch


JamDataApi data_api

A data API client for persisting project information


String session_id = "unset"

  • void @session_id_setter ( String value )

There is currently no description for this property. Please help us by contributing one!


JamConnect _jc

There is currently no description for this property. Please help us by contributing one!


Method Descriptions

void _ready ( )

There is currently no description for this method. Please help us by contributing one!


void _notification ( Variant what )

There is currently no description for this method. Please help us by contributing one!


void server_start ( Dictionary args )

Configures and starts server functionality


void _auth_callback ( int peer_id, PackedByteArray data )

Authenticates a player by verifying the provided username and token with the Jam Launch callback. In developer mode, a token with the value "localdev" will always verify successfully.


JamError _check_auth ( String username, String join_token )

There is currently no description for this method. Please help us by contributing one!


void _on_peer_connect ( int peer_id )

There is currently no description for this method. Please help us by contributing one!


void _on_peer_disconnect ( int pid )

There is currently no description for this method. Please help us by contributing one!


void shut_down ( bool do_disconnect=true )

Shuts down the server elegantly


void _setup_local_dev_keys ( )

There is currently no description for this method. Please help us by contributing one!


Variant _fetch_local_dev_keys ( )

There is currently no description for this method. Please help us by contributing one!