DISCARD_STREAM_TIMEOUT_MILLIS| Constructor and Description |
|---|
SpdyTransport(HttpEngine httpEngine,
SpdyConnection spdyConnection) |
| 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.
|
static Response.Builder |
readNameValueBlock(List<Header> headerBlock,
Protocol protocol)
Returns headers for a name value block containing a SPDY response.
|
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.
|
static List<Header> |
writeNameValueBlock(Request request,
Protocol protocol,
String version)
Returns a list of alternating names and values containing a SPDY request.
|
void |
writeRequestBody(RetryableSink requestBody)
Sends the request body returned by
Transport.createRequestBody(com.squareup.okhttp.Request, long) to the
remote peer. |
void |
writeRequestHeaders(Request request)
This should update the HTTP engine's sentRequestMillis field.
|
public SpdyTransport(HttpEngine httpEngine, SpdyConnection spdyConnection)
public okio.Sink createRequestBody(Request request, long contentLength) throws IOException
TransportcreateRequestBody in interface TransportIOExceptionpublic void writeRequestHeaders(Request request) throws IOException
TransportwriteRequestHeaders in interface TransportIOExceptionpublic void writeRequestBody(RetryableSink requestBody) throws IOException
TransportTransport.createRequestBody(com.squareup.okhttp.Request, long) to the
remote peer.writeRequestBody in interface TransportIOExceptionpublic void finishRequest()
throws IOException
TransportfinishRequest in interface TransportIOExceptionpublic Response.Builder readResponseHeaders() throws IOException
TransportreadResponseHeaders in interface TransportIOExceptionpublic static List<Header> writeNameValueBlock(Request request, Protocol protocol, String version)
public static Response.Builder readNameValueBlock(List<Header> headerBlock, Protocol protocol) throws IOException
IOExceptionpublic ResponseBody openResponseBody(Response response) throws IOException
TransportopenResponseBody in interface TransportIOExceptionpublic void releaseConnectionOnIdle()
TransportreleaseConnectionOnIdle in interface Transportpublic void disconnect(HttpEngine engine) throws IOException
disconnect in interface TransportIOExceptionpublic boolean canReuseConnection()
TransportcanReuseConnection in interface TransportCopyright © 2015. All rights reserved.