#NEWLINE# def parse_message( self , payload , conn_id ) : #NEWLINE# #INDENT# if ( len ( payload ) < FRAME_FORMAT_MESSAGE_SIZE ) : #NEWLINE# #INDENT# raise SnakeMQBrokenMessage ( 'message' ) #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# ident = self . _ident_by_conn [ conn_id ] #NEWLINE# #UNINDENT# except KeyError : #NEWLINE# #INDENT# raise SnakeMQNoIdent ( conn_id ) #NEWLINE# #UNINDENT# ( muuid , ttl , flags ) = struct . unpack ( FRAME_FORMAT_MESSAGE , memstr ( payload [ : FRAME_FORMAT_MESSAGE_SIZE ] ) ) #NEWLINE# if ( ttl == INFINITE_TTL ) : #NEWLINE# #INDENT# ttl = None #NEWLINE# #UNINDENT# message = Message ( data = memstr ( payload [ FRAME_FORMAT_MESSAGE_SIZE : ] ) , uuid = muuid , ttl = ttl , flags = flags ) #NEWLINE# self . on_message_recv ( conn_id , ident , message )