protected function createStream($socket, RequestInterface $request, ResponseInterface $response): Stream
    {
        $size = null;

        if ($response->hasHeader('Content-Length')) {
            $size = (int) $response->getHeaderLine('Content-Length');
        }

        return new Stream($request, $socket, $size);
    }
protected function createStream($socket, RequestInterface $request, ResponseInterface $response): Stream
    {
        $size = null;

        if ($response->hasHeader('Content-Length')) {
            $size = (int) $response->getHeaderLine('Content-Length');
        }

        return new Stream($request, $socket, $size);
    }
protected function createStream ( $ socket , RequestInterface $ request , ResponseInterface $ response ) : Stream { $ size = null ; if ( $ response -> hasHeader ( 'Content-Length' ) ) { $ size = ( int ) $ response -> getHeaderLine ( 'Content-Length' ) ; } return new Stream ( $ request , $ socket , $ size ) ; }
Create the stream.

@param resource $socket
Create the stream .