下面列出了怎么用com.squareup.okhttp.internal.spdy.SpdyStream的API类实例代码及写法,或者点击链接到github查看源代码。
@Override public boolean makeReusable(boolean streamCancelled, OutputStream requestBodyOut,
InputStream responseBodyIn) {
if (streamCancelled) {
if (stream != null) {
stream.closeLater(SpdyStream.RST_CANCEL);
return true;
} else {
// If stream is null, it either means that writeRequestHeaders wasn't called
// or that SpdyConnection#newStream threw an IOEXception. In both cases there's
// nothing to do here and this stream can't be reused.
return false;
}
}
return true;
}
@Override public boolean makeReusable(boolean streamCancelled, OutputStream requestBodyOut,
InputStream responseBodyIn) {
if (streamCancelled) {
if (stream != null) {
stream.closeLater(SpdyStream.RST_CANCEL);
return true;
} else {
// If stream is null, it either means that writeRequestHeaders wasn't called
// or that SpdyConnection#newStream threw an IOEXception. In both cases there's
// nothing to do here and this stream can't be reused.
return false;
}
}
return true;
}