#NEWLINE# def parse_protocol_version( self , payload , conn_id ) : #NEWLINE# #INDENT# if ( len ( payload ) != FRAME_FORMAT_PROTOCOL_VERSION_SIZE ) : #NEWLINE# #INDENT# raise SnakeMQBrokenMessage ( 'protocol version' ) #NEWLINE# #UNINDENT# protocol = struct . unpack ( FRAME_FORMAT_PROTOCOL_VERSION , memstr ( payload [ : FRAME_FORMAT_PROTOCOL_VERSION_SIZE ] ) ) [ 0 ] #NEWLINE# if ( protocol != snakemq . version . PROTOCOL_VERSION ) : #NEWLINE# #INDENT# self . send_incompatible_protocol ( conn_id ) #NEWLINE# raise SnakeMQIncompatibleProtocol ( ( 'remote side protocol version is %i' % protocol ) ) #NEWLINE# #UNINDENT# self . log . debug ( ( 'conn=%s remote version %X' % ( conn_id , protocol ) ) )