Registers a new protocol handler to handle incoming messages. The same protocol cannot be registered multiple times.
name of the protocol to register the handler for
object to be registered as protocol handler
Removes a protocol handler if it is registered.
name of the protocol to unregister the handler for
object which will be unregistered
Sends a new event message to the connected client.
name of the protocol
name of the event (also referred to as topic. See Topics for some known ones)
message dictionary which gets sent along the event
Sends a new request message to the connected client.
name of the protocol
name of the request (also referred to as topic. See Topics for some known ones)
message dictionary which gets sent along the request
handler which gets supplied with an error object if the response didn't arrive in time or the status and the message dictionary from the response
Send a new response message to a received request message to the client.
name of the protocol
name of the response (also referred to as topic. See Topics for some known ones)
id from the request, to associate the response to the request
status indication if the request was successful. A status of zero indicates success.
message dictionary which gets sent along the response
DataStream connection which holds any necessary state information, encryption and decryption keys, manages protocol handlers and also handles sending and receiving of data stream frames.