https://github.com/cfnptr/nets
Secure multi-platform networking library with implemented TCP / UDP server and client
https://github.com/cfnptr/nets
c client cpp cross-platform http https library network networking openssl server socket ssl tcp tcp-client tcp-server tls udp udp-client udp-server
Last synced: 3 months ago
JSON representation
Secure multi-platform networking library with implemented TCP / UDP server and client
- Host: GitHub
- URL: https://github.com/cfnptr/nets
- Owner: cfnptr
- License: apache-2.0
- Created: 2020-11-24T11:09:53.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2025-10-17T14:46:42.000Z (4 months ago)
- Last Synced: 2025-10-18T00:03:37.452Z (4 months ago)
- Topics: c, client, cpp, cross-platform, http, https, library, network, networking, openssl, server, socket, ssl, tcp, tcp-client, tcp-server, tls, udp, udp-client, udp-server
- Language: C
- Homepage:
- Size: 664 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Nets
A library providing generic interface for transferring data over a **network** across different platforms.
## Features
* Blocking / non-blocking socket
* Stream client / server (TCP)
* Datagram client / server (UDP)
* Secure socket layer (SSL, TLS)
* Datagrams over TCP stream
* C and C++ implementations
## Supported operating systems
* Windows (10/11)
* Ubuntu (22.04/24.04)
* macOS (14/15)
This list includes only those systems on which functionality testing is conducted.
However, you can also compile it under any other Linux distribution or operating system.
## Build requirements
* C99 compiler
* C++17 compiler (optional)
* [Git 2.30+](https://git-scm.com/)
* [CMake 3.22+](https://cmake.org/)
* [vcpkg](https://learn.microsoft.com/en-us/vcpkg/) (Windows only)
* [brew](https://brew.sh/) (macOS only)
Use building [instructions](BUILDING.md) to install all required tools and libraries.
### CMake options
| Name | Description | Default value |
|---------------------------|--------------------------------------|---------------|
| NETS_BUILD_EXAMPLES | Build Nets usage examples | `ON` |
| NETS_USE_OPENSSL | Use OpenSSL for secure communication | `ON` |
| NETS_ALLOW_DEPRECATED_SSL | Allow deprecated OpenSSL functions | `OFF` |
## Cloning
```
git clone --recursive https://github.com/cfnptr/nets
```
## Building 
* Windows: ```./scripts/build-release.bat```
* macOS / Ubuntu: ```./scripts/build-release.sh```
## Third-party
* [cURL](https://github.com/curl/curl) (curl License)
* [mpmt](https://github.com/cfnptr/mpmt/) (Apache-2.0 License)
* [mpio](https://github.com/cfnptr/mpio/) (Apache-2.0 License)
* [OpenSSL](https://github.com/openssl/openssl/) (Apache-2.0 License)
* [zlib](https://github.com/madler/zlib) (zlib License)
### Inspired by
* [asio](https://github.com/boostorg/asio/)
* [libuv](https://github.com/libuv/libuv/)
### Special thanks to Gigaflops.