public final class SpdyTransport extends Object
| Constructor and Description |
|---|
SpdyTransport(HttpEngine httpEngine,
SpdyConnection spdyConnection) |
| Modifier and Type | Method and Description |
|---|---|
OutputStream |
createRequestBody()
Returns an output stream where the request body can be written.
|
void |
flushRequest()
Flush the request body to the underlying socket.
|
InputStream |
getTransferStream(CacheRequest cacheRequest) |
boolean |
makeReusable(boolean streamCanceled,
OutputStream requestBodyOut,
InputStream responseBodyIn)
Returns true if the underlying connection can be recycled.
|
ResponseHeaders |
readResponseHeaders()
Read response headers and update the cookie manager.
|
void |
writeRequestBody(com.squareup.okhttp.internal.http.RetryableOutputStream requestBody)
Sends the request body returned by
createRequestBody() to the
remote peer. |
void |
writeRequestHeaders()
This should update the HTTP engine's sentRequestMillis field.
|
public SpdyTransport(HttpEngine httpEngine, SpdyConnection spdyConnection)
public OutputStream createRequestBody() throws IOException
flushRequest() before reading the response.writeRequestBody(com.squareup.okhttp.internal.http.RetryableOutputStream). This allows HTTP authorization (401, 407)
responses to be retransmitted transparently.IOExceptionpublic void writeRequestHeaders()
throws IOException
IOExceptionpublic void writeRequestBody(com.squareup.okhttp.internal.http.RetryableOutputStream requestBody)
throws IOException
createRequestBody() to the
remote peer.IOExceptionpublic void flushRequest()
throws IOException
IOExceptionpublic ResponseHeaders readResponseHeaders() throws IOException
IOExceptionpublic InputStream getTransferStream(CacheRequest cacheRequest) throws IOException
IOExceptionpublic boolean makeReusable(boolean streamCanceled,
OutputStream requestBodyOut,
InputStream responseBodyIn)
Copyright © 2014. All rights reserved.