FYI: http://www.wangafu.net/~nickm/libevent-book/Ref5_evutil.html Helper functions and types for Libevent Basic types #ifdef WIN32 #define evutil_socket_t intptr_t #else #define evutil_socket_t int #endif Miscellaneous compatibility types The ev_ssiz…
基础类型   #ifdef WIN32 #define evutil_socket_t intptr_t #else #define evutil_socket_t int #endif ev_ssize_t   时间兼容函数   //前2个参数的计算结果放到第三个参数里面 #define evutil_timeradd(tvp, uvp, vvp) /* ... */ #define evutil_timersub(tvp, uvp, vvp) /* ... */   #define evut…
FYI: http://www.wangafu.net/~nickm/libevent-book/TOC.html The Libevent Reference Manual: Preliminaries Libevent is a library for writing fast portable nonblocking IO. Its design goals are: portability speed scalability convenience The components of L…
FYI: http://www.wangafu.net/~nickm/libevent-book/Ref6_bufferevent.html Bufferevents: concepts and basics Most of the time, an application wants to perform some amount of data buffering in addition to just responding to events. When we want to write d…
FYI: http://www.wangafu.net/~nickm/libevent-book/TOC.html Working with events Libevent’s basic unit of operation is the event. Every event represents a set of conditions, including: A file descriptor being ready to read from or write to. A file descr…
FYI:http://www.wangafu.net/~nickm/libevent-book/ This lib is a integral of asynchronous IO. we should change the concept from blocking PRO to nonblocking PRO. Example: A simple blocking HTTP client /* For sockaddr_in */ #include <netinet/in.h> /* Fo…
By Hamza Ali LAST UPDATED AUG 26, 2018  12,669 104 Laravel provides us with many built-in helper functions that you can call anywhere within your application. They make you workflow convenient for working with arrays & objects, paths, strings, URLs a…
asp.net Razor 视图具有.cshtml后缀,可以轻松的实现c#代码和html标签的切换,大大提升了我们的开发效率.但是Razor语法还是有一些棉花糖值得我们了解一下,可以更加强劲的提升我们的开发效率,减少开发bug的出现.    Razor 采用的是@ 尾巴符号,正是这个符号成就了Mvc开发效率的提升.下面了解一下和@相关的两个可以重用的helper.functions. 作为现代化的程序员,我们尽可能的遵守一个原则.不要重复你自己.所以能够重构的代码我们都会合并,但是这是对于后台代…
http://www.landley.NET/kdocs/htmldocs/drm.html 非常好的一个链接,直接把DRM说的很透.很多API的功能都写全了. Table of Contents 1. Introduction 2. DRM Internals Driver Initialization Driver Information Driver Load Memory management The Translation Table Manager (TTM) The Graphic…
Building an HTTP Client That Interacts with Shodan Shadon(URL:https://www.shodan.io/)  is the world's first search engine for Internet-connected devices. Register and get the API key from Shadon, then set it as an environment variable. Here is a high…