文章分类 -  linux c

epoll实现的回显服务器
摘要:服务器端实现: 1 /************************************************************************* 2 > File Name: epoll.c 3 > Created Time: Fri 13 Mar 20... 阅读全文

posted @ 2015-03-14 19:56 子墨sky 阅读(96) 评论(0) 推荐(0)

linux socket的一个c/s模型例子
摘要:客户端端代码: 1 /************************************************************************* 2 > File Name: clt.c 3 > Created Time: Mon 02 Mar 2015 03... 阅读全文

posted @ 2015-03-02 17:42 子墨sky 阅读(222) 评论(0) 推荐(0)

(摘)linux socket中sockaddr和sockaddr_in
摘要:Structures for handling internet addressesPrototypesinclude // All pointers to socket address structures are often cast to pointers// to this type bef... 阅读全文

posted @ 2015-03-02 16:00 子墨sky 阅读(198) 评论(0) 推荐(0)

boost编译
摘要:开发环境: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... 阅读全文

posted @ 2015-03-01 16:35 子墨sky 阅读(74) 评论(0) 推荐(0)

libc rand()函数描述
摘要: 阅读全文

posted @ 2015-02-06 16:52 子墨sky 阅读(237) 评论(0) 推荐(0)

Linux list
摘要:#ifndef _LINUX_LIST_H#define _LINUX_LIST_H#include #include #include #include /** Simple doubly linked list implementation.** Some of the internal fun... 阅读全文

posted @ 2015-02-06 00:23 子墨sky 阅读(84) 评论(0) 推荐(0)

GCC调试用到的宏变量__FILE__,__LINE__,__func___
摘要:通常在进行调试是需要打印并定位调试信息,那么编译器C提供的几个宏变量就非常起作用了: 1 //__FILE__ 定位所在文件 2 // __LINE__ 定位所在文件行 3 // __func__ 定位所在函数,C99中该宏已替代__FUNCTION__,为了提高可移植性,建议都使用该宏 4 //_... 阅读全文

posted @ 2015-02-04 22:11 子墨sky 阅读(132) 评论(0) 推荐(0)

Linux下生成动态库
摘要:库本质上是一种可执行代码的二进制形式,可以被操作系统载入内存执行。Linux通常有两种库:动态库和静态库。下面说明Linux下动态库生成过程。 假设一个socket功能的库,其头文件clt_socket.h,如下#ifndef CLT_SOCKET_H#define CLT_SOCKET_H#... 阅读全文

posted @ 2015-02-04 15:28 子墨sky 阅读(153) 评论(0) 推荐(0)

导航