Pion Network Library - Overview
Pion Network Library (pion-net) is a C++ development library for implementing lightweight HTTP interfaces.
There are a wide variety of open source HTTP servers available, from fast and lightweight servers such as lighttpd, to full-featured platforms like Apache HTTPD. The motivation of pion-net is not to implement yet another web server, but to provide HTTP(S) functionality to new or existing C++ applications. If you're looking for a full-featured server application, we suggest that you use one of the projects above. If you're working on a Boost C++ application and would just like to use HTTP to provide a simple user interface or interact with run-time data, then pion-net is a much cleaner and simpler solution.
Pion Network Library uses the Boost and asio libraries for multi-threading and asynchronous I/O. Multi-threading allows the use of multiple CPUs or processing cores to process HTTP requests simultaneously. Asynchronous I/O allows each thread to handle many connections simultaneously (otherwise, a single thread would be required for every connection to the server). The combination of these technologies takes full advantage of the most modern CPUs, and allows servers implemented using pion-net to handle many thousands of connections simultaneously with a single physical server.
Pion Network Library lets you run multiple servers listening to any number of ports and network devices. Each server may have its own collection of web services defined which are bound to HTTP resources. Protocols other than HTTP can also easily be implemented for any server. A common thread pool is used to handle operations for all servers. pion-net also supports server-side SSL & TLS encryption when built with the OpenSSL library.
pion-net uses a web service plug-in framework for handling HTTP requests. Users of the library can easily implement services to process requests in any number of ways.
Some example web services included in the distribution:
- HelloService: A simple “hello world” implementation
- LogService: When pion-net is built with one of the supported logging libraries (log4cpp, log4cxx or log4cplus), this service will display the most recent log events recorded.
- EchoService: This service echoes back all information parsed within the HTTP request. It is intended mainly to demonstrate the use of pion-net's HTTPRequest and HTTPResponse objects, and to test pion-net's request parsing.
- CookieService: This service displays all of the cookies currently set within the client's browser and allows you to add and delete cookies.
- FileService: This service associates a disk directory (i.e. “/var/public”) with a web resource name (i.e. “/files”). HTTP requests may be made to receive files from within the directory (i.e. “/files/index.htm” would deliver “/var/public/index.htm”). The file module can cache files in memory to improve performance. It may be configured to recognize changes when they are made, or load everything at startup and never check for changes (for security and performance).
Pion Network Library is open source software licensed under the Boost Software License, which allows anyone to use it for free in both commercial and non-commercial applications.

Recent comments
1 week 14 hours ago
1 week 5 days ago
4 weeks 4 days ago
4 weeks 5 days ago
4 weeks 5 days ago
4 weeks 5 days ago
7 weeks 5 days ago
14 weeks 4 days ago
16 weeks 1 day ago
16 weeks 1 day ago