Binder之前:基础知识


0.对Binder各个组件的简单理解
1.智能指针
2.Parcel

0.结合tcp/ip服务的连接过程来理解Binder各个部件的作用

Binder驱动,ServiceManager,BinderClient,BinderServer

一.tcp/ip服务连接的过程,以访问google.com为例

第一步:Client向DNS查询Google.com的地址

首先Client一定知道DNS的ip,才能向他发起查询,DNS的ip设置是在客户端接入网络前就完成了的,否则client将无法正常访问域名服务器。
当然如果Client已经知道了Server的ip,那么就完全可以跨越这一步直接与Server链接,如windows中的hosts文件,用于查询常用域名与ip的关系,当用户需要访问某个域名的时候,系统会先从这个文件中判断是否已经有这个域名的ip,如果有就不需要想DNS查询了

第二步:DNS将查询结果返回给Client

所以Client的ip地址对DNS应该也是可知的,这些信息会被封装在tcp/ip包中

第三步:Client发起连接

Client得到ip地址后,就通过这个ip来连接Server端

流程中Router的作用

router的作用是将数据包投递到设定的目标ip中

二.对比

Binder驱动-------Router
ServiceManger------->DNS
BinderClient---------->Client
BinderServer---------->Server


2.智能指针


http://www.linuxidc.com/Linux/2015-02/113705.htm
http://www.jb51.net/article/39793.htm
http://eriol.iteye.com/blog/1180515
http://blog.jobbole.com/56316/
http://www.cnblogs.com/yanhuiw/archive/2014/06/28/3813847.html
http://www.cnblogs.com/lanxuezaipiao/p/4132096.html
http://blog.csdn.net/xt_xiaotian/article/details/5714477
http://blog.csdn.net/hackbuteer1/article/details/7561235
http://www.2cto.com/kf/201405/304903.html
https://my.oschina.net/costaxu/blog/103119
http://www.2cto.com/kf/201607/523529.html
http://www.cnblogs.com/wanqieddy/archive/2012/05/08/2490402.html
http://blog.csdn.net/zy_11162311/article/details/8240644
http://www.2cto.com/kf/201605/505391.html
http://www.jb51.net/article/41687.htm
http://developer.51cto.com/art/201001/180894.htm
http://www.cnblogs.com/zhaoshuai1215/p/3432963.html
http://www.2cto.com/kf/201606/519710.html
http://www.2cto.com/kf/201404/293243.html
http://www.tuicool.com/articles/qaIj6vf
http://www.jianshu.com/p/0300b2d833af
http://blog.csdn.net/liuhaoyutz/article/details/30498931
http://blog.csdn.net/luoshengyang/article/details/6786239
http://blog.csdn.net/doom66151/article/details/6567603
http://www.cnblogs.com/yxalag/p/4209710.html
http://blog.chinaunix.net/xmlrpc.php?r=blog/article&uid=28517466&id=3763954
http://www.xuebuyuan.com/1790559.html
http://shyluo.blog.51cto.com/5725845/966559
http://blog.csdn.net/j__king/article/details/39493501
http://blog.csdn.net/jiangwei0910410003/article/details/51303849
http://blog.csdn.net/jscese/article/details/30070775
http://www.tuicool.com/articles/rUBNfa6


3.Parcel


http://www.jianshu.com/p/b37ad6d3b371
http://www.jianshu.com/p/287acb9e396f
http://www.jianshu.com/p/b1fcff2728bd
http://www.jianshu.com/p/82e3090e00e0
http://www.jianshu.com/p/98bc0ed3a6ca
http://www.jianshu.com/p/d361ae3df3d7
http://www.jianshu.com/p/427b29565c96
http://www.cnblogs.com/iplus/archive/2012/05/28/4467423.html
http://blog.csdn.net/wuseyukui/article/details/41647751
http://www.2cto.com/kf/201412/358462.html
http://blog.csdn.net/xxxzhi/article/details/51490253
http://www.cnblogs.com/zhujiabin/p/5693326.html
http://blog.csdn.net/heng615975867/article/details/16119425
http://www.lxway.com/4446440194.htm
http://www.2cto.com/kf/201403/288476.html
http://blog.csdn.net/happy_horse/article/details/51733492
http://blog.csdn.net/lxgwm2008/article/details/8767146
http://blog.csdn.net/caowenbin/article/details/6532238
http://www.thinksaas.cn/topics/0/207/207002.html
http://m.blog.csdn.net/article/details?id=41647751
http://www.th7.cn/Program/Android/201502/392244.shtml
http://www.cnblogs.com/kevinhigher/archive/2012/10/06/2712733.html
http://blog.csdn.net/shift_wwx/article/details/47122687
http://blog.csdn.net/jiangwei0910410003/article/details/18988827
http://blog.csdn.net/flowingflying/article/details/22276821
http://www.xuebuyuan.com/694407.html
http://blog.csdn.net/qinjuning/article/details/6785517
http://blog.csdn.net/caowenbin/article/details/6532217
https://my.oschina.net/helu/blog/141732
http://www.cnblogs.com/renqingping/archive/2012/10/25/Parcelable.html
http://www.linuxidc.com/Linux/2012-02/53066.htm
http://m.blog.csdn.net/article/details?id=51170641
http://www.eoeandroid.com/thread-96681-1-1.html
http://www.eoeandroid.com/thread-96688-1-1.html
http://blog.csdn.net/javazejian/article/details/52665164
http://hjxandhmr.github.io/2016/06/19/Android-SerializeMethod/
http://blog.csdn.net/qq_23547831/article/details/51779528




BINDER
http://mouxuejie.com/blog/2016-04-10/android-ipc-binder-app-layer-analysis/
http://www.woaitqs.cc/android/2016/05/23/android-binder.html
http://blog.csdn.net/huachao1001/article/details/51504469
http://sguotao.com/2015/08/18/android-binder-1/
http://blog.csdn.net/bjp000111/article/details/51919595
http://www.jianshu.com/p/1eff5a13000d
http://www.jianshu.com/p/1bd1f3ebed60
http://gityuan.com/2015/10/31/binder-prepare/
http://www.linuxidc.com/Linux/2011-12/49832p2.htm
http://blog.csdn.net/coding_glacier/article/details/7520199
http://blog.csdn.net/singwhatiwanna/article/details/19756201
http://blog.csdn.net/luoshengyang/article/details/6618363/
http://www.android100.org/html/201402/23/5709.html
http://blog.csdn.net/u010321471/article/category/3096345/3
http://blog.csdn.net/coding_glacier/article/details/7520199
http://www.360doc.com/content/16/0809/07/13792507_581825627.shtml
http://blog.csdn.net/lpjishu/article/details/49783873
http://blog.csdn.net/lpjishu/article/details/49942919
http://www.cnblogs.com/innost/archive/2011/01/09/1931456.html
http://blog.csdn.net/universus/article/details/6211589
http://blog.csdn.net/universus/article/details/6211589
http://weishu.me/2016/01/12/binder-index-for-newer/
http://blog.csdn.net/bettarwang/article/details/51166823
http://gityuan.com/tags/#binder
http://book.51cto.com/art/201105/265295.htm
https://my.oschina.net/youranhongcha/blog?sort=time&p=2&temp=1474848381905

你可能感兴趣的:(Binder之前:基础知识)