Sinespace Client 2025.3.19431
Client-side scripting for Sinespace
SineSpace.Scripting.Network.SNetwork Class Reference
Inheritance diagram for SineSpace.Scripting.Network.SNetwork:
ScriptClass

Public Member Functions

override void Initialise (SScript runtime, object wrapper)
 
void SendNetworkMessage (string key, IDictionary< object, object > message)
 Sends a network message to any other subscribers, will not echo back to this client. Message can be any network-serializable type (int, float, byte, string, char and array[] variants)
 
void SendNetworkMessage (string key, Table message, bool serverOnly, bool loopback)
 Sends a network message to any other subscribers, will not echo back to this client unless loopback is set true. Message can be any network-serializable type (int, float, byte, string, char and array[] variants)
 
void SendNetworkMessage (string key, Table message, bool serverOnly)
 
void SendNetworkMessage (string key, Table message)
 
void SendNetworkMessageToUser (string key, Table message, uint userID)
 
void SubscribeToNetwork (string key, Action< SNetworkMessageLua > onRecieve)
 Subscribes to network messages matching 'key', callback will be called whenever a matching message is recieved.
 
void SubscribeToGlobalNetwork (Closure onRecieve)
 
void SubcribeToGlobalNetwork (Closure onRecieve)
 
void OnGlobalNetworkDisconnect (Closure onDisconnect)
 
void ReconnectGlobalNetwork ()
 
string GetSenderIDFromGlobalMessage (string message)
 
string GetOriginalMsgFromGlobalMessage (string message)
 
void SubscribeToRegionPropertyUpdate (string key, DynValue onRecieve)
 
void SubscribeToNetwork (string key, DynValue onRecieve)
 
void SetRegionProperty (string key, string value)
 Stores a key/value pair in the Regions permanent memory. There can be a maximum of 1000 per region. Subject to rate limiting (dont call more than 10/s)
 
string GetRegionProperty (string key)
 Retrieves the last set value for 'key' in this shard. If you have just joined the region, this may not be populated immedietely.
 
void SetShardProperty (string key, string value)
 Stores a key/value pair in the Shards semi-permanent memory. Will be erased when all players exit the shard, but will persist as long as the shard lives. Subject to rate limiting (dont call more than 10/s)
 
string GetShardProperty (string key)
 Retrieves the last set value for 'key' in this shard. If you have just joined the region, this may not be populated immedietely.
 
void JoinGlobalChannel (string key, string password)
 
void LeaveGlobalChannel ()
 
void GlobalPublish (string key, string message, string password, bool selfExclude=false)
 
- Public Member Functions inherited from ScriptClass
void ReportError (string error, bool fatal, UnityEngine.Object target=null)
 
void Initialise (SScript runtime, object wrapper)
 

Public Attributes

SChat Chat = new SChat()
 

Properties

bool HasShardProperties [get]
 
- Properties inherited from ScriptClass
virtual bool Alive [get]
 
DynValue CachedData [get, set]
 

Additional Inherited Members

- Protected Member Functions inherited from ScriptClass
void Initialise (SScript runtime)
 

Member Function Documentation

◆ GetOriginalMsgFromGlobalMessage()

string SineSpace.Scripting.Network.SNetwork.GetOriginalMsgFromGlobalMessage ( string message)

◆ GetRegionProperty()

string SineSpace.Scripting.Network.SNetwork.GetRegionProperty ( string key)

Retrieves the last set value for 'key' in this shard. If you have just joined the region, this may not be populated immedietely.

Parameters
key
Returns

◆ GetSenderIDFromGlobalMessage()

string SineSpace.Scripting.Network.SNetwork.GetSenderIDFromGlobalMessage ( string message)

◆ GetShardProperty()

string SineSpace.Scripting.Network.SNetwork.GetShardProperty ( string key)

Retrieves the last set value for 'key' in this shard. If you have just joined the region, this may not be populated immedietely.

Parameters
key
Returns

◆ GlobalPublish()

void SineSpace.Scripting.Network.SNetwork.GlobalPublish ( string key,
string message,
string password,
bool selfExclude = false )

◆ Initialise()

override void SineSpace.Scripting.Network.SNetwork.Initialise ( SScript runtime,
object wrapper )

◆ JoinGlobalChannel()

void SineSpace.Scripting.Network.SNetwork.JoinGlobalChannel ( string key,
string password )

◆ LeaveGlobalChannel()

void SineSpace.Scripting.Network.SNetwork.LeaveGlobalChannel ( )

◆ OnGlobalNetworkDisconnect()

void SineSpace.Scripting.Network.SNetwork.OnGlobalNetworkDisconnect ( Closure onDisconnect)

◆ ReconnectGlobalNetwork()

void SineSpace.Scripting.Network.SNetwork.ReconnectGlobalNetwork ( )

◆ SendNetworkMessage() [1/4]

void SineSpace.Scripting.Network.SNetwork.SendNetworkMessage ( string key,
IDictionary< object, object > message )

Sends a network message to any other subscribers, will not echo back to this client. Message can be any network-serializable type (int, float, byte, string, char and array[] variants)

Requests may be rate limited. Use this command sparingly. Rate limits may be reduced as more avatars enter a region.

Parameters
key
message

◆ SendNetworkMessage() [2/4]

void SineSpace.Scripting.Network.SNetwork.SendNetworkMessage ( string key,
Table message )

◆ SendNetworkMessage() [3/4]

void SineSpace.Scripting.Network.SNetwork.SendNetworkMessage ( string key,
Table message,
bool serverOnly )

◆ SendNetworkMessage() [4/4]

void SineSpace.Scripting.Network.SNetwork.SendNetworkMessage ( string key,
Table message,
bool serverOnly,
bool loopback )

Sends a network message to any other subscribers, will not echo back to this client unless loopback is set true. Message can be any network-serializable type (int, float, byte, string, char and array[] variants)

Requests may be rate limited. Use this command sparingly. Rate limits may be reduced as more avatars enter a region.

Parameters
key
message

◆ SendNetworkMessageToUser()

void SineSpace.Scripting.Network.SNetwork.SendNetworkMessageToUser ( string key,
Table message,
uint userID )

◆ SetRegionProperty()

void SineSpace.Scripting.Network.SNetwork.SetRegionProperty ( string key,
string value )

Stores a key/value pair in the Regions permanent memory. There can be a maximum of 1000 per region. Subject to rate limiting (dont call more than 10/s)

Parameters
key
value

◆ SetShardProperty()

void SineSpace.Scripting.Network.SNetwork.SetShardProperty ( string key,
string value )

Stores a key/value pair in the Shards semi-permanent memory. Will be erased when all players exit the shard, but will persist as long as the shard lives. Subject to rate limiting (dont call more than 10/s)

Parameters
key
value

◆ SubcribeToGlobalNetwork()

void SineSpace.Scripting.Network.SNetwork.SubcribeToGlobalNetwork ( Closure onRecieve)

◆ SubscribeToGlobalNetwork()

void SineSpace.Scripting.Network.SNetwork.SubscribeToGlobalNetwork ( Closure onRecieve)

◆ SubscribeToNetwork() [1/2]

void SineSpace.Scripting.Network.SNetwork.SubscribeToNetwork ( string key,
Action< SNetworkMessageLua > onRecieve )

Subscribes to network messages matching 'key', callback will be called whenever a matching message is recieved.

Parameters
key
onRecieve

◆ SubscribeToNetwork() [2/2]

void SineSpace.Scripting.Network.SNetwork.SubscribeToNetwork ( string key,
DynValue onRecieve )

◆ SubscribeToRegionPropertyUpdate()

void SineSpace.Scripting.Network.SNetwork.SubscribeToRegionPropertyUpdate ( string key,
DynValue onRecieve )

Member Data Documentation

◆ Chat

SChat SineSpace.Scripting.Network.SNetwork.Chat = new SChat()

Property Documentation

◆ HasShardProperties

bool SineSpace.Scripting.Network.SNetwork.HasShardProperties
get