Module: on

Call the on function with either data or close function.
Parameters:
Name Type Description
data string The module is defined to parse JSON data. The client checks for the 'function' in data. The event 'update' or 'status' will be triggered and accordingly 'receiver_cb' or 'stale_cb' will be checked for null values.
close string The callback function close_cb is checked for null values and close_cb() is called
Source:
Parameters:
Name Type Description
type array type of event: - receiver: calls back with new streams that are available - sender: calls back with new streams that are subscribed - stale: call back with streams that went stale for this receiver and can be unsubscribed - dropped: calls back with streams that dropped the subscription for a sender - close: the control connection was closed - data: calls back when data has arrived with (streamID, data, header)
cb array a function with the corresponding callback
Source:
Function to register event handlers for specific events
Parameters:
Name Type Description
data string The module is defined to parse JSON data. The client checks for the 'function' in data. The event 'update' or 'status' will be triggered and accordingly 'receiver_cb' or 'stale_cb' will be checked for null values.
close string The callback function close_cb is checked for null values and close_cb() is called
Source:
Parameters:
Name Type Description
type array type of event: - receiver: calls back with new streams that are available - sender: calls back with new streams that are subscribed - stale: call back with streams that went stale for this receiver and can be unsubscribed - dropped: calls back with streams that dropped the subscription for a sender - close: the control connection was closed - data: calls back when data has arrived with (streamID, data, header)
cb array a function with the corresponding callback
Source: