CrossSock is a lightweight socket library developed on top of berkley sockets (POSIX / Winsock). CrossSock has the following advantages over raw system calls:
- Type-safe: CrossSock is safe, as sockets are encapsulated into classes.
- Simple: CrossSock is high level and performs many of the tedious tasks involved in networked applications.
- Header-only: CrossSock is easy to add into any existing project, just include the headers and you are all set!
- Multi-use: CrossSock includes a low-level socket.
- Cross-platform: Works with UNIX and Windows based machines.
This is version: 1.0
CrossSock is a header-only library, and so no installation is necessary. Simple include the header files that you need, and it is ready to go!
Note that CrossSock requires c++ 11 support, and so be sure to compile with the -std=c++11 flag.
A client and server example projects are available for Visual Studios 2015 in the Examples folder. Please see CrossClientDemo.cpp and CrossServerDemo.cpp for general use of CrossSock.
A low-level socket API is included in CrossSock.h that supports UDP and TCP sockets.
CrossUtil.h includes standalone system utility, such as a timer and sleep functions, delegation, and endianness conversions can be found in.
CrossPack.h includes a high-level packet implementation. See the files for more details.
A high-level client-server architecture is included in the CrossClient.h and CrossServer.h files. Please see the example projects for general use.
Licensed under the BSD License. Please see the LICENSE file included with the CrossSock source code.