src/SwooleEmitter.php
/**
     * Sends the message body of the response.
     *
     * @param \Psr\Http\Message\ResponseInterface $response
     *
     * @return void
     */
Sends the message body of the response.

@return void
Sends the message body of the response . @return void
private function sendBody(ResponseInterface $response): void
    {
        $body = $response->getBody();
        $body->rewind();
        if ($body->getSize() <= $this->chunkSize) {
            $this->swooleResponse->end($body->getContents());
            return;
        }
        while (! $body->eof()) {
            $this->swooleResponse->write($body->read($this->chunkSize));
        }
        $this->swooleResponse->end();
    }
private function sendBody ( ResponseInterface $ response ) : void { $ body = $ response -> getBody ( ) ; $ body -> rewind ( ) ; if ( $ body -> getSize ( ) <= $ this -> chunkSize ) { $ this -> swooleResponse -> end ( $ body -> getContents ( ) ) ; return ; } while ( ! $ body -> eof ( ) ) { $ this -> swooleResponse -> write ( $ body -> read ( $ this -> chunkSize ) ) ; } $ this -> swooleResponse -> end ( ) ; }
Sends the message body of the response.
Sends the message body of the response .