Magnum also offers basic networking support, both for writing clients and for developing servers.
The following features are currently available in Magnum:
- Sockets. The most basic class for implementing networking are sockets. Magnum implements an easy to use wrapper for TCP, UDP and Multicast sockets.
- Server Sockets. Server sockets are a special type of sockets that listen on a well defined TCP port and wait for clients to connect. Each connection will result in a new connection-specific TCP socket to be created.
- Simple Multithreaded Server Skeleton. For helping dveelopers at creating server applications, Magnum contains a simple to use server skeleton that spawns a new thread for each accepted connection. This ensures good performance for each individual connection.
- HTTP Client. For accessing files and streams on the web, a simple to use and still flexible HTTP client is included. Once a connection is established, the client will return a simple input stream to the application that can be used like a normal file based input stream. Thus direct opening of files from the web can be handeled almost transparently.
- URL and Address Classes. For efficient working with internnet addresses, hostnames, URLs etc, Magnum has included some small but powerful helper classes.
- MIME-Headers Support. Originally designed for the Http client module, a MIME header class helps you at creating advanced queries to web servers and at interpreting their response in an easy way.