Ejemplo n.º 1
0
  def __init__(self):
    self._fs = fs_client.FleetspeakConnection()

    self._sender_queue = Queue.Queue(
        maxsize=GRRFleetspeakClient._SENDER_QUEUE_MAXSIZE)

    # The client worker does all the real work here.
    # In particular, we delegate sending messages to Fleetspeak to a separate
    # threading.Thread here.
    self._client_worker = comms.GRRThreadedWorker(
        out_queue=_FleetspeakQueueForwarder(self._sender_queue),
        start_worker_thread=False)
Ejemplo n.º 2
0
    def __init__(self):
        self._fs = fs_client.FleetspeakConnection()

        self._sender_queue = Queue.Queue(
            maxsize=GRRFleetspeakClient._SENDER_QUEUE_MAXSIZE)

        self._threads = {}

        # The client worker does all the real work here.
        # In particular, we delegate sending messages to Fleetspeak to a separate
        # threading.Thread here.
        self._threads["Worker"] = comms.GRRThreadedWorker(
            out_queue=_FleetspeakQueueForwarder(self._sender_queue),
            start_worker_thread=False,
            client=self)
        self._threads["Foreman"] = self._CreateThread(self._ForemanOp)
        self._threads["Sender"] = self._CreateThread(self._SendOp)
        self._threads["Receiver"] = self._CreateThread(self._ReceiveOp)
Ejemplo n.º 3
0
 def CreateClientCommunicator(self):
   self.client_communicator = comms.GRRHTTPClient(
       ca_cert=config_lib.CONFIG["CA.certificate"],
       worker=comms.GRRThreadedWorker(start_worker_thread=False))