随笔分类 -  libevent源代码

libevent源代码之c实现多态
摘要:读libevent源代码,有几点体会,记录如下,希望猎头看到,赶紧来挖我啊。1、libevent源代码是用c语言写的,但是通过结构体实现了c++中的多态,叹为观止。具体介绍如下:struct eventop { const char *name; void *(*init)(struct eve... 阅读全文
posted @ 2015-03-25 00:31 xgcode 阅读(235) 评论(0) 推荐(0)