DISCARD_STREAM_TIMEOUT_MILLIS| Constructor and Description |
|---|
Http2Codec(OkHttpClient client,
StreamAllocation streamAllocation,
Http2Connection connection) |
| Modifier and Type | Method and Description |
|---|---|
void |
cancel()
Cancel this stream.
|
okio.Sink |
createRequestBody(Request request,
long contentLength)
Returns an output stream where the request body can be streamed.
|
void |
finishRequest()
Flush the request to the underlying socket and signal no more bytes will be transmitted.
|
void |
flushRequest()
Flush the request to the underlying socket.
|
static List<Header> |
http2HeadersList(Request request) |
ResponseBody |
openResponseBody(Response response)
Returns a stream that reads the response body.
|
static Response.Builder |
readHttp2HeadersList(List<Header> headerBlock)
Returns headers for a name value block containing an HTTP/2 response.
|
Response.Builder |
readResponseHeaders(boolean expectContinue)
Parses bytes of a response header from an HTTP transport.
|
void |
writeRequestHeaders(Request request)
This should update the HTTP engine's sentRequestMillis field.
|
public Http2Codec(OkHttpClient client, StreamAllocation streamAllocation, Http2Connection connection)
public okio.Sink createRequestBody(Request request, long contentLength)
HttpCodeccreateRequestBody in interface HttpCodecpublic void writeRequestHeaders(Request request) throws IOException
HttpCodecwriteRequestHeaders in interface HttpCodecIOExceptionpublic void flushRequest()
throws IOException
HttpCodecflushRequest in interface HttpCodecIOExceptionpublic void finishRequest()
throws IOException
HttpCodecfinishRequest in interface HttpCodecIOExceptionpublic Response.Builder readResponseHeaders(boolean expectContinue) throws IOException
HttpCodecreadResponseHeaders in interface HttpCodecexpectContinue - true to return null if this is an intermediate response with a "100"
response code. Otherwise this method never returns null.IOExceptionpublic static Response.Builder readHttp2HeadersList(List<Header> headerBlock) throws IOException
IOExceptionpublic ResponseBody openResponseBody(Response response) throws IOException
HttpCodecopenResponseBody in interface HttpCodecIOExceptionCopyright © 2017. All Rights Reserved.