View Source ow_session (overworld v2.0.0)
Summary
Functions
Alias for proxy(PID, self())
Alias for proxy(PID, undefined)
Get the termination callback
Set the termination callback
Get the game data
Set the game data
Get the session id of this session (network serializable)
Set the session ID for this session (network serializable)
Get the session latency
Set the session latency
Get the pid of the session's proxy process.
Set the pid of the session's proxy process, including ENet, WebSocket and internal handlers.
Get the format for serializing data.
Set the format for serializing data. If communication happens all within Erlang node(s), then there is no need to set a serializer.
Start the session server and create a new session with this ID
Stop the session server
Get the session token.
Sets the session token
Get the zone pid
Sets the zone pid
Types
-type id() :: pos_integer().
-type proxy_pid() :: pid() | undefined.
-type serializer() :: undefined | protobuf.
-type token() :: binary() | undefined.
-type zone_pid() :: pid() | undefined.
Functions
Alias for proxy(PID, self())
Alias for proxy(PID, undefined)
Get the termination callback
Set the termination callback
Get the game data
Set the game data
Get the session id of this session (network serializable)
Set the session ID for this session (network serializable)
-spec latency(pid()) -> non_neg_integer().
Get the session latency
-spec latency(pos_integer(), pid()) -> {ok, pos_integer()}.
Set the session latency
Get the pid of the session's proxy process.
Set the pid of the session's proxy process, including ENet, WebSocket and internal handlers.
-spec serializer(pid()) -> serializer() | undefined.
Get the format for serializing data.
-spec serializer(serializer(), pid()) -> {ok, serializer()}.
Set the format for serializing data. If communication happens all within Erlang node(s), then there is no need to set a serializer.
-spec start() -> {ok, pid()}.
Start the session server and create a new session with this ID
-spec stop(pid()) -> ok.
Stop the session server
Get the session token.
Sets the session token
Get the zone pid
Sets the zone pid