From dd4ed0068a2d7fe36c33c085b6f77c035ac4993b Mon Sep 17 00:00:00 2001 From: Dries C Date: Sat, 6 Apr 2024 00:10:07 +0100 Subject: [PATCH] Add support for the latest PMMP --- ProxyPacketSender.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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); + } } }