class documentation

class SubscribeListener(object):

View In Hierarchy

Callback API to receive notifications when new subscribers connect and disconnect.

Method peer_subscribe callback when a peer has subscribed from a topic @param topic_name: topic name. NOTE: topic name will be resolved/remapped @type topic_name: str @param topic_publish: method to publish message data to all subscribers @type topic_publish: fn(data) @param peer_publish: method to publish message data to...
Method peer_unsubscribe callback when a peer has unsubscribed from a topic @param topic_name: topic name. NOTE: topic name will be resolved/remapped @type topic_name: str @param num_peers: number of remaining peers subscribed to topic @type num_peers: int...
def peer_subscribe(self, topic_name, topic_publish, peer_publish):

callback when a peer has subscribed from a topic @param topic_name: topic name. NOTE: topic name will be resolved/remapped @type topic_name: str @param topic_publish: method to publish message data to all subscribers @type topic_publish: fn(data) @param peer_publish: method to publish message data to

new subscriber. NOTE: behavior for the latter is transport-dependent as some transports may be broadcast only.

@type peer_publish: fn(data)

def peer_unsubscribe(self, topic_name, num_peers):

callback when a peer has unsubscribed from a topic @param topic_name: topic name. NOTE: topic name will be resolved/remapped @type topic_name: str @param num_peers: number of remaining peers subscribed to topic @type num_peers: int