protected function writeRequest($socket, RequestInterface $request, int $bufferSize = 8192)
    {
        if (false === $this->fwrite($socket, $this->transformRequestHeadersToString($request))) {
            throw new BrokenPipeException('Failed to send request, underlying socket not accessible, (BROKEN EPIPE)', $request);
        }

        if ($request->getBody()->isReadable()) {
            $this->writeBody($socket, $request, $bufferSize);
        }
    }
protected function writeRequest($socket, RequestInterface $request, int $bufferSize = 8192)
    {
        if (false === $this->fwrite($socket, $this->transformRequestHeadersToString($request))) {
            throw new BrokenPipeException('Failed to send request, underlying socket not accessible, (BROKEN EPIPE)', $request);
        }

        if ($request->getBody()->isReadable()) {
            $this->writeBody($socket, $request, $bufferSize);
        }
    }
protected function writeRequest ( $ socket , RequestInterface $ request , int $ bufferSize = 8192 ) { if ( false === $ this -> fwrite ( $ socket , $ this -> transformRequestHeadersToString ( $ request ) ) ) { throw new BrokenPipeException ( 'Failed to send request, underlying socket not accessible, (BROKEN EPIPE)' , $ request ) ; } if ( $ request -> getBody ( ) -> isReadable ( ) ) { $ this -> writeBody ( $ socket , $ request , $ bufferSize ) ; } }
Write a request to a socket.

@param resource $socket

@throws BrokenPipeException
Write a request to a socket .