Skip to content

Commit

Permalink
Add support for the latest PMMP
Browse files Browse the repository at this point in the history
  • Loading branch information
dries-c committed Apr 5, 2024
1 parent fc57fab commit dd4ed00
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ProxyPacketSender.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}

Expand Down

0 comments on commit dd4ed00

Please sign in to comment.