parser = new FrameParser(); } public function id(): int { return $this->connection->id; } /** * @return Frame[] */ public function push(string $data): array { return $this->parser->push($data); } public function send(Frame $frame): bool|null { return $this->connection->send(FrameCodec::encode($frame)); } public function close(): void { $this->connection->close(); } public function pauseRecv(): void { $this->connection->pauseRecv(); } public function resumeRecv(): void { $this->connection->resumeRecv(); } public function getSendBufferQueueSize(): int { return $this->connection->getSendBufferQueueSize(); } public function getRemoteIp(): string { return $this->connection->getRemoteIp(); } }