#NEWLINE# def __init__( self , owner , port_file , http_port_file , timeout ) : #NEWLINE# #INDENT# super ( Client , self ) . __init__ ( owner ) #NEWLINE# with open ( port_file ) as f : #NEWLINE# #INDENT# self . port = int ( f . read ( ) ) #NEWLINE# #UNINDENT# with open ( http_port_file ) as f : #NEWLINE# #INDENT# self . http_port = int ( f . read ( ) ) #NEWLINE# #UNINDENT# self . timeout = timeout #NEWLINE# self . init_counters ( ) #NEWLINE# methods = [ m for m in inspect . getmembers ( self , predicate = inspect . ismethod ) if m [ 0 ] . startswith ( 'message_' ) ] #NEWLINE# self . logger . debug ( ( ( ( 'reflectively found ' + str ( len ( methods ) ) ) + ' message handlers: ' ) + str ( methods ) ) ) #NEWLINE# self . handlers = dict ( ( ( ( ':' + m [ 0 ] [ len ( 'message_' ) : ] . replace ( '_' , '-' ) ) , ( m [ 1 ] , None , None ) ) for m in methods ) ) #NEWLINE# self . socket = None