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.IOException
public void writeRequestHeaders() throws IOException
IOException
public void writeRequestBody(com.squareup.okhttp.internal.http.RetryableOutputStream requestBody) throws IOException
createRequestBody()
to the
remote peer.IOException
public void flushRequest() throws IOException
IOException
public ResponseHeaders readResponseHeaders() throws IOException
IOException
public InputStream getTransferStream(CacheRequest cacheRequest) throws IOException
IOException
public boolean makeReusable(boolean streamCanceled, OutputStream requestBodyOut, InputStream responseBodyIn)
Copyright © 2014. All rights reserved.