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
IOExceptionvoid writeRequestHeaders(Request request) throws IOException
IOExceptionvoid writeRequestBody(RetryableSink requestBody) throws IOException
createRequestBody(com.squareup.okhttp.Request, long) to the
remote peer.IOExceptionvoid finishRequest()
throws IOException
IOExceptionResponse.Builder readResponseHeaders() throws IOException
IOExceptionResponseBody openResponseBody(Response response) throws IOException
IOExceptionvoid releaseConnectionOnIdle()
throws IOException
IOExceptionvoid disconnect(HttpEngine engine) throws IOException
IOExceptionboolean canReuseConnection()
Copyright © 2015. All rights reserved.