2014年7月25日

摘要: #ifndef _PRODUCT_H_H#define _PRODUCT_H_Hclass Product{public: virtual ~Product() = 0;protected: Product();private:};class ConcreteProduct : public Pro... 阅读全文
posted @ 2014-07-25 17:18 Cluren 阅读(162) 评论(0) 推荐(0)

2014年7月23日

摘要: 此代码是用来回忆当初学的shell脚本,很多知识忘了,写这个花了我三个小时的时间#!/bin/ksh#count *.c file the num of lineg_csum=0g_hsum=0count(){# echo "$1,count_line" file_name... 阅读全文
posted @ 2014-07-23 17:34 Cluren 阅读(481) 评论(0) 推荐(0)

2013年6月3日

摘要: 在网络编程中,我们需要一种功能,即如果一个或多个I/O条件满足时,进程就被通知到,这能力就叫做I/O复用;在Linux中,实现I/O复用的方法有几种,如多进程,多线程,信号驱动等,常见的是select函数(系统调用)实现;此函数允许进程指示的内核等待多个事件中的一个发生,并仅在一个或多个事件发生或经... 阅读全文
posted @ 2013-06-03 23:10 Cluren 阅读(247) 评论(0) 推荐(0)
 
摘要: 概念层面:Udp的特点:1.udp是无连接的2.udp是尽最大努力交付3.udp是面向报文的4.udp没有拥塞控制5.udp支持一对一,一对多,多对一或多对多的交互通信6.udp的首部开销小(8比特)Tcp的特点:1.tcp是面向连接的运输层协议2.tcp连接只能是点对点3.tcp是可靠交付的4.t... 阅读全文
posted @ 2013-06-03 23:08 Cluren 阅读(244) 评论(0) 推荐(0)