Esempio n. 1
0
    def __init__(self, transport):
        Connection.__init__(self, transport)
        self._messages = []
        self._cond = threading.Condition()
        self._quitting = False

        # We're really protected from attack by the session key, we hope
        self._tx_seq = -1  #random.randint(0, 1 << 32)
        self._rx_seq = None

        #self._t = Timer(10, lambda : self.send({'hi':'again'}), recurring=True)

        self._touched = time.time()

        self._send_welcome()
Esempio n. 2
0
  def __init__ (self, transport):
    Connection.__init__(self, transport)
    self._messages = []
    self._cond = threading.Condition()
    self._quitting = False

    # We're really protected from attack by the session key, we hope
    self._tx_seq = -1 #random.randint(0, 1 << 32)
    self._rx_seq = None

    #self._t = Timer(10, lambda : self.send({'hi':'again'}), recurring=True)

    self._touched = time.time()

    self._send_welcome()
Esempio n. 3
0
    def __init__(self, transport):
        Connection.__init__(self, transport)
        self._cond = threading.Condition()
        self._quitting = False

        # We're really protected from attack by the session key, we hope, so
        # we currently start tx_seq at zero, which makes it easier for the
        # client.
        self._next_tx_seq = 0  # next seq to create
        self._sent_tx_seq = -1  # last seq sent
        self._rx_seq = None

        # Waiting outgoing messages as (seq, msg) pairs
        self._tx_buffer = []

        # Out-of-order messages we've gotten (the in-order ones are dispatched
        # immediately, so they're never buffered)
        self._rx_buffer = []

        self._touch()

        self._send_welcome()
  def __init__ (self, transport):
    Connection.__init__(self, transport)
    self._cond = threading.Condition()
    self._quitting = False

    # We're really protected from attack by the session key, we hope, so
    # we currently start tx_seq at zero, which makes it easier for the
    # client.
    self._next_tx_seq = 0  # next seq to create
    self._sent_tx_seq = -1 # last seq sent
    self._rx_seq = None

    # Waiting outgoing messages as (seq, msg) pairs
    self._tx_buffer = []

    # Out-of-order messages we've gotten (the in-order ones are dispatched
    # immediately, so they're never buffered)
    self._rx_buffer = []

    self._touch()

    self._send_welcome()