上一页 1 ··· 33 34 35 36 37 38 39 40 41 ··· 48 下一页
摘要: 阅读全文
posted @ 2012-11-09 12:03 helloweworld 阅读(145) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2012-11-09 10:40 helloweworld 阅读(172) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2012-11-09 10:13 helloweworld 阅读(171) 评论(0) 推荐(0) 编辑
摘要: 如果不计任选字段,TCP首部通常是20字节,封装在IP数据报中。 32位序号 序号用来标识从TCP发端向TCP收端发送的数据字节流,它表示在这个报文段中的的第一个数据字节。如果将字节流看作在两个应用程序间的单向流动,则TCP用序号对每个字节进行计数。序号是32bit的无符号数,序号到达2^32-1后又从0开始。 32位确认序号 确认序号包含发送确认的一端所期望收到的下一个序号。因此,确认序号应当是上次已成功收到数据字节序号加1。只有ACK标志(下面介绍)为1时确认序号字段才有效。 4位首部长度 首部长度给出首部中32bit字的数目。需要这个值是因为任选字段的长度是可变的。 例如... 阅读全文
posted @ 2012-11-08 19:56 helloweworld 阅读(3674) 评论(0) 推荐(0) 编辑
摘要: 实验步骤: 1、server监听; 2、client连接; 3、client发hello good boy; 4、kill 服务器已经连接的socket子进程; 5、client发anotherline. 相关代码UnixTCPServerModify.c UnixTCPClientModify.c 阅读全文
posted @ 2012-11-08 17:11 helloweworld 阅读(337) 评论(0) 推荐(0) 编辑
摘要: 参考http://hi.baidu.com/qiaoyongfeng/item/1c08243807f95949023edc52wait头文件:#include <sys/types.h>#include <sys/wait.h>原型:pid_t wait(int *status);参数:status用来保存被收集进程退出时的一些状态,如果我们队这个子进程是如何死掉的毫不在意,只是想把这个僵尸进程消灭掉,则可设定status为NULL.返回值:如果成功,wait会返回被收集的子进程的进程ID,如果调用进程没有子进程,调用就会失败,此时wait返回-1,同时errno被置 阅读全文
posted @ 2012-11-06 17:50 helloweworld 阅读(575) 评论(0) 推荐(0) 编辑
摘要: 脚本/etc/rc.local应用程序ubuntu10.10 在"首选项中"设置"启动应用程序"。ubuntu12.04 桌面右上角设置图标。 阅读全文
posted @ 2012-11-02 10:58 helloweworld 阅读(266) 评论(0) 推荐(0) 编辑
摘要: /* ============================================================================ Name : AlarmSignal.c Author : Version : Copyright : Your copyright notice Description : 每3秒执行一个相同的动作。 ============================================================================ */#include <stdio.h>#i... 阅读全文
posted @ 2012-10-31 15:53 helloweworld 阅读(266) 评论(0) 推荐(0) 编辑
摘要: 父子进程是共享文件表(文件状态标志、当前文件偏移量和v节点指针)的,和相互独立进程不一样。详细见Unix高级环境编程p175.#include <stdio.h>#include <stdlib.h>#include <sys/types.h>#include <unistd.h>#include <fcntl.h>#include <string.h>int main(void){ int fd = open("test.txt", O_RDWR | O_CREAT | O_TRUNC); char 阅读全文
posted @ 2012-10-29 21:48 helloweworld 阅读(594) 评论(0) 推荐(0) 编辑
摘要: 在软件管理器中不能完全卸载,需要在终端运行命令:#sudo apt-get remove network-manager上述命令可使网络实验无冲突,purge选项未实验。 阅读全文
posted @ 2012-10-26 11:11 helloweworld 阅读(1347) 评论(0) 推荐(0) 编辑
上一页 1 ··· 33 34 35 36 37 38 39 40 41 ··· 48 下一页