Knot is a lightweight and simple TCP networking C++ library with no dependencies.
License: zlib License
C++ 100.00%
knot's Introduction
knot
Knot is a lightweight and simple TCP network C++11 library with no dependencies.
Knot is tiny. One header and one source file.
Knot is cross-platform. Compiles under MSVC/GCC. Works on Windows/Linux.
Knot is zlib/libpng licensed.
Public API
namespaceknot {
connect(); // connects to a network address.send(); // sends data bytes thru a connection.receive(); // receives data bytes from a connection.receive(); // receives data bytes from a http connection.disconnect(); // closes an established connection.listen(); // creates a listening thread.shutdown(); // shutdowns a listening thread.sleep(); // puts a thread to sleep.reset_counters(); // reset transmission stats.get_bytes_received(); // get number of bytes received since last reset.get_bytes_sent(); // get number of bytes received since last reset.get_interface_address(); // get address of current interface address (requires an established connection)lookup(); // get uri from url or host:port address.close_r(); // disable read operations on socket.close_w(); // disable write operations on socket.
}