parameters: (self, kedata)
docstring: Wrap a raw piece of data in a Kismet external interface frame and write it;
          this data must be a serialized kismet_pb2.Command frame.
  
          :param kedata: Serialized kismet_pb2.Command data
  
          :return: None
docstring_summary: Wrap a raw piece of data in a Kismet external interface frame and write it;
          this data must be a serialized kismet_pb2.Command frame.
docstring_tokens: Wrap a raw piece of data in a Kismet external interface frame and write it ; this data must be a serialized kismet_pb2 . Command frame .
function: def write_raw_packet(self, kedata):
          """
          Wrap a raw piece of data in a Kismet external interface frame and write it;
          this data must be a serialized kismet_pb2.Command frame.
  
          :param kedata: Serialized kismet_pb2.Command data
  
          :return: None
          """
  
          try:
              if not 'ext_writer' in vars(self) and self.websocket == None:
                  raise RuntimeError("packet written before connection established")
  
              signature = 0xDECAFBAD
              serial = bytearray(kedata.SerializeToString())
  
              checksum = ExternalInterface.adler32(serial)
              length = len(serial)
  
              packet = bytearray(struct.pack("!III", signature, checksum, length))
  
              # Drop it on the asyncio writer and queue it to go out
              if not self.websocket == None:
                  self.add_task(self.websocket.send, [packet + serial])
              else:
                  self.ext_writer.write(packet + serial)
                  self.add_task(self.ext_writer.drain)
  
          except Exception as e:
              # If we failed a low-level write we're just screwed, exit
              print("FATAL:  Encountered error writing to kismet: ", e, file=sys.stderr)
              self.kill()
function_tokens: def write_raw_packet ( self , kedata ) : try : if not 'ext_writer' in vars ( self ) and self . websocket == None : raise RuntimeError ( "packet written before connection established" ) signature = 0xDECAFBAD serial = bytearray ( kedata . SerializeToString ( ) ) checksum = ExternalInterface . adler32 ( serial ) length = len ( serial ) packet = bytearray ( struct . pack ( "!III" , signature , checksum , length ) ) # Drop it on the asyncio writer and queue it to go out if not self . websocket == None : self . add_task ( self . websocket . send , [ packet + serial ] ) else : self . ext_writer . write ( packet + serial ) self . add_task ( self . ext_writer . drain ) except Exception as e : # If we failed a low-level write we're just screwed, exit print ( "FATAL:  Encountered error writing to kismet: " , e , file = sys . stderr ) self . kill ( )