C语言之libevent和socket示例(二)

使用tailq队列存储数据来处理可读可写的事件 #include stdio.h#include string.h#include stdlib.h#include netinet/in.h#include netinet/tcp.h#include event.h#include sys/types.h#include sys/socket.h#include errno.h#include fcntl.h#include sys/queue.h#include err....

» 阅读全文

Tags: c语言

C语言之用 GDB 调试程序断错误

linux下断错误调试方法 http://alovelycat.blog.sohu.com/118756560.html 用 GDB 调试程序 http://zhangyafeikimi.iteye.com/blog/249885

» 阅读全文

Tags: c语言

C语言之尾队列tailq

queue和list的结构定义和操作都在sys/queue.h中完成, 主要定义了下面四种数据结构: 单向列表(single-linked lists) 单向尾队列(single-linked tail queue) 列表(lists) 尾队列(tail queues) 尾队列图示 尾队列常用宏 宏名称 操作 TAILQ_INIT 初始化队列 TAILQ_FOREACH 对队列进行遍历操作 TAILQ_INSERT_BEFORE 在指定元素之前插入元素 TAILQ_INSE...

» 阅读全文

tailq-example-r30.tar.gz (5.27 K, 下载次数:0, 上传时间:2012-01-27 22:53)

Tags: c语言

了解HTTP服务器推送技术COMET

一个WebChat的服务(可插拔jetty版module) http://hedahai119.iteye.com/blog/736673 jquerycomet http://code.google.com/p/jquerycomet/source/checkout Comet:基于 HTTP 长连接的服务器推技术 http://www.ibm.com/developerworks/cn/web/wa-lo-comet/ Grizzly是一种应用程序框架 http://d...

» 阅读全文

Tags: comet

svn忽略文件新法

vim . svn ignore 每种要忽略的文件加一行,如: .svnignore *.pyc *.cash test.php 然后 svn pe svn:ignore -F .svnignore svn status

» 阅读全文

Tags: svn

C语言之libevent和socket示例(一)

源码和注释: #include stdio.h#include string.h#include stdlib.h#include netinet/in.h#include netinet/tcp.h#include event.h#include sys/types.h#include sys/socket.h#include errno.h#include fcntl.h//内部函数,只能被本文件中的函数调用static short ListenPort = 8080;...

» 阅读全文

socket.c (7.34 K, 下载次数:0, 上传时间:2012-01-27 00:08)

Tags: c语言

回顶部