id; } public function send(Frame $frame): bool|null { if ($this->closed) { return false; } return $this->session->sendFrame($frame, $this->maxSendBuffer); } public function close(): void { if ($this->closed) { return; } $this->closed = true; $this->session->close(); } public function pauseRecv(): void { $this->session->pause(); } public function resumeRecv(): void { $this->session->resume(); } public function getSendBufferQueueSize(): int { return $this->session->getSendBufferQueueSize(); } public function getRemoteIp(): string { return $this->connection->getRemoteIp(); } public function updateConnection(UdpConnection $connection): void { $this->connection = $connection; } public function isClosed(): bool { return $this->closed || $this->session->isClosed(); } }