
本文共 5442 字,大约阅读时间需要 18 分钟。
OkHttp������������
1.1 OkHttp ���������������
OkHttp ������������ Google ������������������ HTTP ������������������������������������������������������������ SPDY ������������ HTTP 2.0��������������������������������������������� HTTP ������������������������OkHttp ��������������������� GZIP ���������������������������������������������������������������������������������OkHttp ���������������������������������������������������������������������������������������������������������������������������OkHttp ���������������������������������������������������������Persistent connections��������������������������������������������������������� TCP ���������������������������������������������������������OkHttp ��������������������������������������������������������������� RetryAndFollowUpInterceptor ������������������������������
1.2 OkHttp ������������������
OkHttp ������������������������ Dispatcher������������������Interceptor���������������������Dispatcher ���������������������������������������������������������������������������������������Interceptor ��������������������������������������������������������������� SSL ������������������������������������������BridgeInterceptor ��� CacheInterceptor ���������������������������������������������������������������������������
1.3 OkHttp ������������������
������������ OkHttp ��������������������������������� UI���
��������������������������������������� OkHttpClient ������������������������������������������������ asynchronous ��������������������������������������������������������� UI���
OkHttp ������������������
OkHttp ���������������������������������������������������������������������������������������Dispatcher ���������������������������������������������������Interceptors ���������������������Call��������������������� HTTP ��������������������� Callback ������������������������������
OkHttp ���������������������
��� Persistent connections��������������� Keep-Alive ������������������������ TCP ������������������������������
��� GZIP ��������������������������������������������������������������������������� ��������������������� CacheInterceptor ��������������������������������������������� ��������������������� RetryAndFollowUpInterceptor ������������������������������������������������������������OkHttp ������������
OkHttp ���������������������������������������������������������������������������������������������������Builder ������������������������������������������������������������������������������������������������������������������������������������������������������
2.1 ���������������������������������
���������������������������������������������������������������������OkHttp ������������������������������������������ HTTP 2.0���GZIP ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������
������ persistent connections��������� TCP ���������������������������������������������������������
������ HTTP ������headers������������������������������������������������������������
��������������������������������������������� HTTP ������������������������������������������
���������������������������������������������������������������������������������������������
���������������������������������������������������������������������
2.2 ���������������������������������������
���������������������������������������������������������OkHttp ������������������������������������������������������������������ ConnectionPool ������������ TCP ���������������������������������������������������������������������������������
������ ConnectionPool������ TCP ������������������������������������������������
������ DNS rr��������� DNS ���������������������������������������������
** hospitals ������**������������������������������������������������������
������������������������������������������������������������ Nginx������
���������������������������������������������������������������������������������
2.3 OkHttp ��� Apache HttpComponents Compared
������������ Apache HttpComponents ���������OkHttp ������������������������������������������������������������������������������OkHttp ������������������������
������������������������������������������������������������������
������������������������������������������������������ HTTP/2 ������������������������
���������������������������������������������������������������
������������������OkHttp ��������������������� HTTP ������������������������������
��������������������������� ConnectionPool ������������������������������ TCP ������������������
3.1 OkHttp ���������������������������
OkHttp ���������������������������������������������������������������������������������������������������������������������������������������
��������������������������������� Keep-Alive ��������������� TCP ������������������������������������������
������������������������������������������ GZIP ���������������������������������
������������������������������ CacheInterceptor ���������������������������������
���������������������������������������������������������������������������������������������������
���������������������������������������������������������������������������������������������������������������
������������������������������������������������������������������������������������������������������������
发表评论
最新留言
关于作者
