Scripting/SNetworkMessage

From sine.space Wiki
Jump to: navigation, search

The SNetworkMessage class contains a network message sent by another script

Fields

Key

string Key { get; }

The key this message was sent with

getKey = function(arguments)

  local sampleKey = "The message key is " .. arguments.Key;

end

Message

IDictionary(object,object) Message { get; }

The message body which was sent

gotAMessage = function(arguments)

  local sampleMsg = "Got a message with the argument " .. arguments.Message["someArgument"];
end

-- View SubscribeToNetwork in Scripting/SNetwork for a full script example.