public interface Transport
Modifier and Type | Field and Description |
---|---|
static int |
DISCARD_STREAM_TIMEOUT_MILLIS
The timeout to use while discarding a stream of input data.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canReuseConnection()
Returns true if the socket connection held by this transport can be reused
for a follow-up exchange.
|
okio.Sink |
createRequestBody(Request request,
long contentLength)
Returns an output stream where the request body can be streamed.
|
void |
disconnect(HttpEngine engine) |
void |
finishRequest()
Flush the request to the underlying socket.
|
ResponseBody |
openResponseBody(Response response)
Returns a stream that reads the response body.
|
Response.Builder |
readResponseHeaders()
Read and return response headers.
|
void |
releaseConnectionOnIdle()
Configures the response body to pool or close the socket connection when
the response body is closed.
|
void |
writeRequestBody(RetryableSink requestBody)
Sends the request body returned by
createRequestBody(com.squareup.okhttp.Request, long) to the
remote peer. |
void |
writeRequestHeaders(Request request)
This should update the HTTP engine's sentRequestMillis field.
|
static final int DISCARD_STREAM_TIMEOUT_MILLIS
okio.Sink createRequestBody(Request request, long contentLength) throws IOException
IOException
void writeRequestHeaders(Request request) throws IOException
IOException
void writeRequestBody(RetryableSink requestBody) throws IOException
createRequestBody(com.squareup.okhttp.Request, long)
to the
remote peer.IOException
void finishRequest() throws IOException
IOException
Response.Builder readResponseHeaders() throws IOException
IOException
ResponseBody openResponseBody(Response response) throws IOException
IOException
void releaseConnectionOnIdle() throws IOException
IOException
void disconnect(HttpEngine engine) throws IOException
IOException
boolean canReuseConnection()
Copyright © 2015. All rights reserved.