#NEWLINE# def __init__( self , identifier , domain , packeter , queues_storage = None ) : #NEWLINE# #INDENT# '\n        :param identifier: peer identifier\n        :param domain: currently unused\n        :param packeter: :class:`~snakemq.packeter.Packeter`\n        :param queues_storage: :class:`~snakemq.storage.QueuesStorageBase`\n        ' #NEWLINE# self . identifier = identifier [ : MAX_IDENT_LENGTH ] #NEWLINE# self . domain = domain #NEWLINE# self . packeter = packeter #NEWLINE# self . queues_manager = QueuesManager ( queues_storage ) #NEWLINE# self . log = logging . getLogger ( 'snakemq.messaging' ) #NEWLINE# self . keepalive_interval = None #NEWLINE# self . keepalive_wait = 0.5 #NEWLINE# self . on_error = Callback ( ) #NEWLINE# self . on_message_recv = Callback ( ) #NEWLINE# self . on_message_sent = Callback ( ) #NEWLINE# self . on_message_drop = Callback ( ) #NEWLINE# self . on_connect = Callback ( ) #NEWLINE# self . on_disconnect = Callback ( ) #NEWLINE# self . _ident_by_conn = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# self . _conn_by_ident = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# self . _keepalive = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# self . _message_by_packet = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# packeter . link . on_loop_pass . add ( self . _on_link_loop_pass ) #NEWLINE# packeter . on_connect . add ( self . _on_connect ) #NEWLINE# packeter . on_disconnect . add ( self . _on_disconnect ) #NEWLINE# packeter . on_packet_recv . add ( self . _on_packet_recv ) #NEWLINE# packeter . on_packet_sent . add ( self . _on_packet_sent ) #NEWLINE# self . queues_manager . on_item_drop . add ( self . _on_queue_item_drop ) #NEWLINE# self . _lock = threading . Lock ( )