- OkHttpClient: okhttp客户端
- RealCall:
- getResponseWithInterceptorChain:获取响应
- Chain: 责任链的接口 5。 RealInterceptChain: Chain的唯一一个实现类
- proceed
- OkHttpClient.newCall
- RealCall.enqueue
- Dispatcher.enqueue
- DIspatcher: 分发器,负责请求调配和分发
- enqueue:
1。 线程池:0个核心线程,最大线程数不限,60秒后如果不使用便会释放
- 线程池不会一直缓存线程,可能会出现长时间不使用的情况
- 重要类和方法
- ConnectInterceptor
- ConnectionPool
- RealConnection
- RequestLine