public final class Exchange extends Object
ExchangeCodec, which handles the actual I/O.| 构造器和说明 |
|---|
Exchange(Transmitter transmitter,
Call call,
EventListener eventListener,
com.lark.oapi.okhttp.internal.connection.ExchangeFinder finder,
ExchangeCodec codec) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
cancel() |
RealConnection |
connection() |
Sink |
createRequestBody(Request request,
boolean duplex) |
void |
detachWithViolence()
Revoke this exchange's access to streams.
|
void |
finishRequest() |
void |
flushRequest() |
boolean |
isDuplex()
Returns true if the request body need not complete before the response body starts.
|
RealWebSocket.Streams |
newWebSocketStreams() |
void |
noNewExchangesOnConnection() |
void |
noRequestBody() |
ResponseBody |
openResponseBody(Response response) |
Response.Builder |
readResponseHeaders(boolean expectContinue) |
void |
responseHeadersEnd(Response response) |
void |
responseHeadersStart() |
void |
timeoutEarlyExit() |
Headers |
trailers() |
void |
webSocketUpgradeFailed() |
void |
writeRequestHeaders(Request request) |
public Exchange(Transmitter transmitter, Call call, EventListener eventListener, com.lark.oapi.okhttp.internal.connection.ExchangeFinder finder, ExchangeCodec codec)
public RealConnection connection()
public boolean isDuplex()
public void writeRequestHeaders(Request request) throws IOException
IOExceptionpublic Sink createRequestBody(Request request, boolean duplex) throws IOException
IOExceptionpublic void flushRequest()
throws IOException
IOExceptionpublic void finishRequest()
throws IOException
IOExceptionpublic void responseHeadersStart()
@Nullable public Response.Builder readResponseHeaders(boolean expectContinue) throws IOException
IOExceptionpublic void responseHeadersEnd(Response response)
public ResponseBody openResponseBody(Response response) throws IOException
IOExceptionpublic Headers trailers() throws IOException
IOExceptionpublic void timeoutEarlyExit()
public RealWebSocket.Streams newWebSocketStreams() throws SocketException
SocketExceptionpublic void webSocketUpgradeFailed()
public void noNewExchangesOnConnection()
public void cancel()
public void detachWithViolence()
public void noRequestBody()
Copyright © 2025. All rights reserved.