MCPcopy Index your code
hub / github.com/USArmyResearchLab/Dshell / __init__

Method __init__

dshell/core.py:488–520  ·  view source on GitHub ↗
(self, **kwargs)

Source from the content-addressed store, hash-verified

486 blob_filtering = True
487
488 def __init__(self, **kwargs):
489 super().__init__(**kwargs)
490
491 # similar to packet_queue and raw_packet_queue in superclass
492 self._connection_queue = []
493 # Flag used to determine if we are ready to produce closed connections
494 # for the next plugin in the chain.
495 self._production_ready = True
496
497 # dictionary to store packets for connections according to addr()
498 # NOTE: Only currently unhandled (ie. open) connections are stored here.
499 self._connection_tracker = {}
500
501 # define overall counts as multiprocessing Values for --parallel
502 self.seen_conn_count = Value('i', 0)
503 self.handled_conn_count = Value('i', 0)
504
505 # maximum number of blobs a connection will store before calling
506 # connection_handler
507 # it defaults to infinite, but this should be lowered for huge datasets
508 self.maxblobs = float("inf") # infinite
509
510 # how long do we wait before deciding a connection is "finished"
511 # time is checked by iterating over cached connections and checking if
512 # the timestamp of the connection's last packet is older than the
513 # timestamp of the current packet, minus this value
514 self.timeout = datetime.timedelta(hours=1)
515 # The number of packets to process between timeout checks.
516 self.timeout_frequency = 50
517 # The maximum number of open connections allowed at one time.
518 # If the maximum number of connections is met, the oldest connections
519 # will be force closed.
520 self.max_open_connections = 1000
521
522 def _postmodule(self):
523 """

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected