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
Transport
createRequestBody
in interface Transport
IOException
public void writeRequestHeaders(Request request) throws IOException
Transport
writeRequestHeaders
in interface Transport
IOException
public void writeRequestBody(RetryableSink requestBody) throws IOException
Transport
Transport.createRequestBody(com.squareup.okhttp.Request, long)
to the
remote peer.writeRequestBody
in interface Transport
IOException
public void finishRequest() throws IOException
Transport
finishRequest
in interface Transport
IOException
public Response.Builder readResponseHeaders() throws IOException
Transport
readResponseHeaders
in interface Transport
IOException
public static List<Header> writeNameValueBlock(Request request, Protocol protocol, String version)
public static Response.Builder readNameValueBlock(List<Header> headerBlock, Protocol protocol) throws IOException
IOException
public ResponseBody openResponseBody(Response response) throws IOException
Transport
openResponseBody
in interface Transport
IOException
public void releaseConnectionOnIdle()
Transport
releaseConnectionOnIdle
in interface Transport
public void disconnect(HttpEngine engine) throws IOException
disconnect
in interface Transport
IOException
public boolean canReuseConnection()
Transport
canReuseConnection
in interface Transport
Copyright © 2015. All rights reserved.