本文整理汇总了Java中com.squareup.okhttp.OkHttpClient.getConnectionPool方法的典型用法代码示例。如果您正苦于以下问题:Java OkHttpClient.getConnectionPool方法的具体用法?Java OkHttpClient.getConnectionPool怎么用?Java OkHttpClient.getConnectionPool使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.squareup.okhttp.OkHttpClient
的用法示例。
在下文中一共展示了OkHttpClient.getConnectionPool方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: HttpEngine
import com.squareup.okhttp.OkHttpClient; //导入方法依赖的package包/类
public HttpEngine(OkHttpClient client, Request request, boolean bufferRequestBody, boolean
callerWritesRequestBody, boolean forWebSocket, StreamAllocation streamAllocation,
RetryableSink requestBodyOut, Response priorResponse) {
this.client = client;
this.userRequest = request;
this.bufferRequestBody = bufferRequestBody;
this.callerWritesRequestBody = callerWritesRequestBody;
this.forWebSocket = forWebSocket;
if (streamAllocation == null) {
streamAllocation = new StreamAllocation(client.getConnectionPool(), createAddress
(client, request));
}
this.streamAllocation = streamAllocation;
this.requestBodyOut = requestBodyOut;
this.priorResponse = priorResponse;
}