tag, $this->command, ); $this->connection->send($request); $streamResponse = $this->connection->receive(); return $this->responseHandler->handle($this->tag, $streamResponse, $this); } /** * Like interact() but yields each untagged Line immediately as it arrives. * The terminal Status is the generator's return value. * * @return Generator */ public function streamInteract(): Generator { $request = sprintf( "%s %s\r\n", $this->tag, $this->command, ); $this->connection->send($request); $streamResponse = $this->connection->receive(); yield from $this->responseHandler->stream($this->tag, $streamResponse, $this); } public function continue(): void { if (!$this->command instanceof Continuable) { throw new RuntimeException( sprintf('Command %s does not support continuable interaction', $this->command->command()) ); } $this->connection->send($this->command->continue()."\r\n"); } }