class documentation

Keeps track of the clients multiple calls to subscribe.

Chooses the most appropriate settings to send messages

Method __init__ Create a subscription for the specified client on the specified topic, with callback publish
Method is_empty Return true if there are no subscriptions currently
Method on_msg Raw callback called by subscription manager for all incoming messages.
Method subscribe Add another client's subscription request
Method unregister Unsubscribes this subscription and cleans up resources
Method unsubscribe Unsubscribe this particular client's subscription
Method update_params Determine the 'lowest common denominator' params to satisfy all subscribed clients.
Instance Variable client_id Undocumented
Instance Variable clients Undocumented
Instance Variable compression Undocumented
Instance Variable fragment_size Undocumented
Instance Variable handler Undocumented
Instance Variable handler_lock Undocumented
Instance Variable publish Undocumented
Instance Variable queue_length Undocumented
Instance Variable throttle_rate Undocumented
Instance Variable topic Undocumented
Method _publish Internal method to propagate published messages to the registered publish callback
def __init__(self, client_id, topic, publish):

Create a subscription for the specified client on the specified topic, with callback publish

Keyword arguments: client_id -- the ID of the client making this subscription topic -- the name of the topic to subscribe to publish -- the callback function for incoming messages

def is_empty(self):

Return true if there are no subscriptions currently

def on_msg(self, msg):

Raw callback called by subscription manager for all incoming messages.

Incoming messages are passed to the message handler which may drop, buffer, or propagate the message

def subscribe(self, sid=None, msg_type=None, throttle_rate=0, queue_length=0, fragment_size=None, compression='none'):

Add another client's subscription request

If there are multiple calls to subscribe, the values actually used for queue_length, fragment_size, compression and throttle_rate are chosen to encompass all subscriptions' requirements

Keyword arguments: sid -- the subscription id from the client msg_type -- the type of the message to subscribe to throttle_rate -- the minimum time (in ms) allowed between messages being sent. If multiple subscriptions, the lower of these is used queue_length -- the number of messages that can be buffered. If multiple subscriptions, the lower of these is used fragment_size -- None if no fragmentation, or the maximum length of allowed outgoing messages compression -- "none" if no compression, or some other value if compression is to be used (current valid values are 'png')

def unregister(self):

Unsubscribes this subscription and cleans up resources

def unsubscribe(self, sid=None):

Unsubscribe this particular client's subscription

Keyword arguments: sid -- the individual subscription id. If None, all are unsubscribed

def update_params(self):

Determine the 'lowest common denominator' params to satisfy all subscribed clients.

client_id =

Undocumented

clients: dict =

Undocumented

compression: str =

Undocumented

fragment_size =

Undocumented

handler =

Undocumented

handler_lock =

Undocumented

publish =

Undocumented

queue_length =

Undocumented

throttle_rate =

Undocumented

topic =

Undocumented

def _publish(self, message):

Internal method to propagate published messages to the registered publish callback