diff --git a/ProxyPacketSender.php b/ProxyPacketSender.php index 7a98e1d..91d53d3 100644 --- a/ProxyPacketSender.php +++ b/ProxyPacketSender.php @@ -26,13 +26,17 @@ public function __construct(int $socketId, ProxyNetworkInterface $handler) $this->handler = $handler; } - public function send(string $payload, bool $immediate): void + public function send(string $payload, bool $immediate, ?int $receiptId): void { if (!$this->closed) { $pk = new ForwardPacket(); $pk->payload = $payload; $this->handler->putPacket($this->socketId, $pk); + + if ($receiptId !== null) { // todo: check if QUIC supports packets with a specific ack + $this->handler->getSession($this->socketId)?->handleAckReceipt($receiptId); + } } }