libevnet 0.3.4 review
Downloadlibevnet library provides a suite of interfaces, all built around libevent [http://www.monkey.org/~provos/libevent] , useful to netwo
|
|
libevnet library provides a suite of interfaces, all built around libevent [http://www.monkey.org/~provos/libevent] , useful to network daemons.
bufio.h: Non-blocking line and block buffered I/O routines, providing tail recursive behavior so callers cannot overflow their stack with multiple back-to-back I/O issues (i.e. attempting unbounded recursive I/O operations before falling into the event loop).
This feature preserves the natural way to code in an asychronous manner by safeguarding against certain types of pathological behavior and malicious attacks.
socket.h: Asychronous accept(2) and connect(2), supporting IPv4, IPv6 and Unix Domain sockets transparently. Also supports encapsulated host address lookups for "one-shot" connection handling with automatic fallback (for MX and SRV hosts).
tls.h: OpenSSL interface which plugs into the buffered I/O API in bufio.h and socket.h API.
thread.h: Threading implementation for running "blocking" routines asychronously. Run a function in a separate thread, and have the return value collected and passed back asynchronously to the original caller.
lookup.h: Comprehensive DNS resolver with a dead simple interface. Supports PTR, A, AAAA, CNAME, NS, MX, TXT, SOA and SRV records, as well as "compound queries".
A lookup of A+AAAA+SRV first queries the SRV records, sorts them, then resolves each SRV host to an A and/or AAAA host (with a configurable CNAME chaining limit). The response is a linked list of lookup structures, beginning with an SRV record, associated A/AAAA sockaddr structures, the next SRV record, and so on. A+MX has similar behavior. This feature actually reduces network traffic, since most of the time the initial DNS query response contains all the necessary information in the additional section.
DNS SRV records are compliantly sorted according to RFC 2782 [http://rfc-ref.org/RFC-TEXTS/2782/]
What's New in This Release:
An /etc/{hosts,resolv.conf} parser bug which caused parsing to cease at the first blank line or full-line comment was fixed.
A missing return statement was added in a static function from bufio.h which could prevent successful compilation or cause weird run-time behavior. socket_setsockstate() was added, so a socket object can be derived from an existing, connected descriptor.
libevnet 0.3.4 keywords