类 Http2ExchangeCodec
java.lang.Object
com.lark.oapi.okhttp.internal.http2.Http2ExchangeCodec
- 所有已实现的接口:
ExchangeCodec
Encode requests and responses using HTTP/2 frames.
-
字段概要
从接口继承的字段 com.lark.oapi.okhttp.internal.http.ExchangeCodec
DISCARD_STREAM_TIMEOUT_MILLIS -
构造器概要
构造器构造器说明Http2ExchangeCodec(OkHttpClient client, RealConnection realConnection, Interceptor.Chain chain, Http2Connection connection) -
方法概要
修饰符和类型方法说明voidcancel()Cancel this stream.Returns the connection that carries this codec.createRequestBody(Request request, long contentLength) Returns an output stream where the request body can be streamed.voidFlush the request to the underlying socket and signal no more bytes will be transmitted.voidFlush the request to the underlying socket.http2HeadersList(Request request) openResponseBodySource(Response response) static Response.BuilderreadHttp2HeadersList(Headers headerBlock, Protocol protocol) Returns headers for a name value block containing an HTTP/2 response.readResponseHeaders(boolean expectContinue) Parses bytes of a response header from an HTTP transport.longreportedContentLength(Response response) trailers()Returns the trailers after the HTTP response.voidwriteRequestHeaders(Request request) This should update the HTTP engine's sentRequestMillis field.
-
构造器详细资料
-
Http2ExchangeCodec
public Http2ExchangeCodec(OkHttpClient client, RealConnection realConnection, Interceptor.Chain chain, Http2Connection connection)
-
-
方法详细资料
-
http2HeadersList
-
readHttp2HeadersList
public static Response.Builder readHttp2HeadersList(Headers headerBlock, Protocol protocol) throws IOException Returns headers for a name value block containing an HTTP/2 response.- 抛出:
IOException
-
connection
从接口复制的说明:ExchangeCodecReturns the connection that carries this codec.- 指定者:
connection在接口中ExchangeCodec
-
createRequestBody
从接口复制的说明:ExchangeCodecReturns an output stream where the request body can be streamed.- 指定者:
createRequestBody在接口中ExchangeCodec
-
writeRequestHeaders
从接口复制的说明:ExchangeCodecThis should update the HTTP engine's sentRequestMillis field.- 指定者:
writeRequestHeaders在接口中ExchangeCodec- 抛出:
IOException
-
flushRequest
从接口复制的说明:ExchangeCodecFlush the request to the underlying socket.- 指定者:
flushRequest在接口中ExchangeCodec- 抛出:
IOException
-
finishRequest
从接口复制的说明:ExchangeCodecFlush the request to the underlying socket and signal no more bytes will be transmitted.- 指定者:
finishRequest在接口中ExchangeCodec- 抛出:
IOException
-
readResponseHeaders
从接口复制的说明:ExchangeCodecParses bytes of a response header from an HTTP transport.- 指定者:
readResponseHeaders在接口中ExchangeCodec- 参数:
expectContinue- true to return null if this is an intermediate response with a "100" response code. Otherwise this method never returns null.- 抛出:
IOException
-
reportedContentLength
- 指定者:
reportedContentLength在接口中ExchangeCodec
-
openResponseBodySource
- 指定者:
openResponseBodySource在接口中ExchangeCodec
-
trailers
从接口复制的说明:ExchangeCodecReturns the trailers after the HTTP response. May be empty.- 指定者:
trailers在接口中ExchangeCodec- 抛出:
IOException
-
cancel
public void cancel()从接口复制的说明:ExchangeCodecCancel this stream. Resources held by this stream will be cleaned up, though not synchronously. That may happen later by the connection pool thread.- 指定者:
cancel在接口中ExchangeCodec
-