/ :: bitbashing

C++ Networking

In an earlier post, I lamented the dearth of really solid C++ networking libraries. Someone on the Monotone list mentioned a networking library, Asio that I'm getting warm fuzzies about. The interface reminds me a bit of Python's Twisted (which I have beeen carrying around in my head as an ideal for some time now), is actively maintained, fairly portable, and seems to have a bright future - it's being included in the next release of Boost, and it looks likely that it will be included in C++ TR2 (meaning there is a very strong chance that something derived from Asio will be included in the next version of the C++ standard, due out in a year or two).

The normal synchronous interface is very simple and easy to use, though it also isn't anything particularly special; OO wrappers to Berkeley sockets abound. The real prize is an asynchronous interface based on the Proactor pattern [Asio = asynchronous I/O]. I'm still having some trouble really wrapping my head around the proactor, but I've got good feelings about the design and implementation, so I'm going to keep playing around with it.

Right now Asio is mostly focused on networking, but in principle should be extendable to file access, windowing event loops, audio input and output, and all kinds of other interesting things.

Posted 2006/11/05 in programming; no comments

< Algorithmic Complexity Attacks on Allocators | Market-Based Resource Allocation >

Name:


E-mail:


URL:


Comment: