摘要:服务器端实现: 1 /************************************************************************* 2 > File Name: epoll.c 3 > Created Time: Fri 13 Mar 20...
阅读全文
摘要:客户端端代码: 1 /************************************************************************* 2 > File Name: clt.c 3 > Created Time: Mon 02 Mar 2015 03...
阅读全文
摘要:Structures for handling internet addressesPrototypesinclude // All pointers to socket address structures are often cast to pointers// to this type bef...
阅读全文
摘要:开发环境:debian testing 3.16--amd64 gcc 4.9.1 automake 1.14boost1.55.0build_boost.shcd boost./bootstrap.sh --prefix=././b2 --link=static --threading=mul...
阅读全文
摘要:#ifndef _LINUX_LIST_H#define _LINUX_LIST_H#include #include #include #include /** Simple doubly linked list implementation.** Some of the internal fun...
阅读全文
摘要:通常在进行调试是需要打印并定位调试信息,那么编译器C提供的几个宏变量就非常起作用了: 1 //__FILE__ 定位所在文件 2 // __LINE__ 定位所在文件行 3 // __func__ 定位所在函数,C99中该宏已替代__FUNCTION__,为了提高可移植性,建议都使用该宏 4 //_...
阅读全文
摘要:库本质上是一种可执行代码的二进制形式,可以被操作系统载入内存执行。Linux通常有两种库:动态库和静态库。下面说明Linux下动态库生成过程。 假设一个socket功能的库,其头文件clt_socket.h,如下#ifndef CLT_SOCKET_H#define CLT_SOCKET_H#...
阅读全文