#NEWLINE# def send_request( self , request ) : #NEWLINE# #INDENT# 'Serialize and send the given proto request object.' #NEWLINE# logging . debug ( 'Sending request:\n<\n%s>' , request ) #NEWLINE# self . last_sent_request = request #NEWLINE# payload = request . SerializeToString ( ) #NEWLINE# size = struct . pack ( b'!L' , len ( payload ) ) #NEWLINE# self . transport . write ( ( size + payload ) )