)
if address[0] != self._peer[0] or address[1] != self._peer[1]:
continue
- self._connection.receive_datagram(
- datagram, self._peer[0], time.time()
- )
+ self._connection.receive_datagram(datagram, address, time.time())
# Wake up the timer in case the sender is sleeping, as there may be
# stuff to send now.
async with self._wake_timer:
while not self._done:
datagrams = self._connection.datagrams_to_send(time.time())
for datagram, address in datagrams:
- assert address == self._peer[0]
+ assert address == self._peer
await self._socket.sendto(datagram, self._peer, None)
(expiration, interval) = self._get_timer_values()
try:
if connection is not None:
return (connection, False)
qconn = aioquic.quic.connection.QuicConnection(configuration=self._conf)
- qconn.connect(address, time.time())
+ lladdress = dns.inet.low_level_address_tuple((address, port))
+ qconn.connect(lladdress, time.time())
connection = self._connection_factory(
qconn, address, port, source, source_port, self
)
except BlockingIOError:
return
with self._lock:
- self._connection.receive_datagram(datagram, self._peer[0], time.time())
+ self._connection.receive_datagram(datagram, self._peer, time.time())
def _drain_wakeup(self):
while True:
deadline=trio.current_time() + interval
) as self._worker_scope:
datagram = await self._socket.recv(QUIC_MAX_DATAGRAM)
- self._connection.receive_datagram(
- datagram, self._peer[0], time.time()
- )
+ self._connection.receive_datagram(datagram, self._peer, time.time())
self._worker_scope = None
self._handle_timer(expiration)
datagrams = self._connection.datagrams_to_send(time.time())