摘要: 纠错控制由上层(传输层)执行IP首部中的源站地址也可能出错,请错误的源地址重传数据报是 没有意义的 阅读全文
posted @ 2018-05-08 21:45 Loading~ 阅读(461) 评论(0) 推荐(0) 编辑
摘要: 在首部中的错误比在数据中的错误更重 如:一个错误的地址可能导致分组被投递到错误的主机。许多主机并不检查投递给它们的分组是否 确定是要投递给它们,它们假定网络从来不会把别人的分组包传递给自己。数据不参加检验和的计 算,因为这样做代价大,上层协议通常也做这种检验工作,从而引起重复和多余。因此,这样做可 阅读全文
posted @ 2018-05-08 21:42 Loading~ 阅读(477) 评论(0) 推荐(0) 编辑
摘要: 面向连接的服务 通信双方在通信时要事先建立一条通信线路,其过程包括建立连接、使用链接、释放链接三个过程 如: TCP 电话 面向无连接的服务 通信双方不需要事先建立一条通信线路,而是把每个带有目的选址的包(报文分组)送到线路上,由 系统选定路线进行传输 如:IP UDP 邮政 优缺点 前者实时可靠, 阅读全文
posted @ 2018-05-08 21:34 Loading~ 阅读(434) 评论(0) 推荐(0) 编辑
摘要: 只用MAC 虽然每个设备都有唯一的硬件地址,但不都是MAC格式。 只用MAC的话理论上是可行的,但是其中 兼容不同的硬件地址,处理起来是非常困难的。而且数据链路层也没有必要处理网络层的逻辑。 只用IP 首先你要搞清楚IP属于网络层,其实质是虚拟互联网络,也就是说是逻辑地址,真正走的时候是转 化为硬件 阅读全文
posted @ 2018-05-08 11:54 Loading~ 阅读(895) 评论(0) 推荐(0) 编辑
摘要: public class nonRecursiveMergeSort { public static void main(String[] args) { int[] list = {8,4,3,6,9}; MergeSort(list); for(int num:list) System.out. 阅读全文
posted @ 2018-05-07 22:12 Loading~ 阅读(153) 评论(0) 推荐(0) 编辑
摘要: public class MergeSort { public static void mergeSort(int [] list){ if(list.length 1){ int [] firstHalf = new int[list.length/2]; System.arraycopy(lis 阅读全文
posted @ 2018-05-07 22:10 Loading~ 阅读(142) 评论(0) 推荐(0) 编辑
摘要: public class InsertSort { public static void insertSort(int [] list){ for(int i=2;icurrentElement;k ){ list[k+1] = list[k]; } list[k+1] = currentEleme 阅读全文
posted @ 2018-05-07 22:09 Loading~ 阅读(633) 评论(0) 推荐(0) 编辑
摘要: public class BucketSort { public static void main(String[] args) { int[] list = {1000, 192, 221, 12, 23}; print(list); System.out.println(); bucketSor 阅读全文
posted @ 2018-05-07 22:08 Loading~ 阅读(155) 评论(0) 推荐(0) 编辑
摘要: public class HeapSort { public static void HeapAdjust(int[] num, int s, int m){ int temp = num[s]; for(int i=2 s;i=num.length) return false; else retu 阅读全文
posted @ 2018-05-07 22:08 Loading~ 阅读(189) 评论(0) 推荐(0) 编辑
摘要: public class BubbleSort { public static void bubbleSort(int [] list){ boolean needNextPass = true; for(int i=1;ilist[j+1]){ int temp = list[j]; list[j 阅读全文
posted @ 2018-05-07 22:07 Loading~ 阅读(157) 评论(0) 推荐(0) 编辑