parameters: (self, data, flags=0)
docstring: Send data, prepending the length in the first 8 bytes.
docstring_summary: Send data, prepending the length in the first 8 bytes.
docstring_tokens: Send data prepending the length in the first 8 bytes .
function: def sendheader(self, data, flags=0):
          """Send data, prepending the length in the first 8 bytes."""
          try:
              self.log(MythLog.SOCKET|MythLog.NETWORK, MythLog.DEBUG, \
                              'write --> %d' % len(data), py3_str(data, True))
              # build the byte array:
              length = b'%-8d' % len(data)
              data = b"".join([length, data])
              self.send(data, flags)
          except socket.error as e:
              raise MythError(MythError.SOCKET, e.args)
function_tokens: def sendheader ( self , data , flags = 0 ) : try : self . log ( MythLog . SOCKET | MythLog . NETWORK , MythLog . DEBUG , 'write --> %d' % len ( data ) , py3_str ( data , True ) ) # build the byte array: length = b'%-8d' % len ( data ) data = b"" . join ( [ length , data ] ) self . send ( data , flags ) except socket . error as e : raise MythError ( MythError . SOCKET , e . args )