Netlibpp

netlibpp is a modern cross-platform C++ network library that supports TCP/UDP protocols, and compatible with C++11, C++14, C++17, and C++20.
Alternatives To Netlibpp
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Cilium14,79815a day ago547September 14, 20221,115apache-2.0Go
eBPF-based Networking, Security, and Observability
Zerotierone10,709
1a day ago6March 29, 2017179otherC++
A Smart Ethernet Switch for Earth
Libzmq8,393152 days ago2March 24, 2018277gpl-3.0C++
ZeroMQ core engine in C++, implements ZMTP/3.1
Portmaster6,4821a day ago106September 22, 2022310agpl-3.0Go
🏔 Love Freedom - ❌ Block Mass Surveillance
Netmaker6,341
a day ago64September 20, 2022137otherGo
Netmaker makes networks with WireGuard. Netmaker automates fast, secure, and distributed virtual networks.
Netshoot5,860
20 days ago20apache-2.0Shell
a Docker + Kubernetes network trouble-shooting swiss-army container
Fast Android Networking5,536
21 days ago241apache-2.0Java
🚀 A Complete Fast Android Networking Library that also supports HTTP/2 🚀
Gamenetworkingresources5,397
3 months ago2C
A Curated List of Game Network Programming Resources
Hp Socket5,053112 months ago1September 25, 201724otherC
High Performance TCP/UDP/HTTP Communication Component
Cjdns4,987
a month ago1February 27, 2018106gpl-3.0C
An encrypted IPv6 network using public-key cryptography for address allocation and a distributed hash table for routing.
Alternatives To Netlibpp
Select To Compare


Alternative Project Comparisons
Readme

netlibpp

CMake Linux Build CMake Windows Build

netlibpp is a modern header only cross-platform C++ network library for developing network services using TCP/UDP protocols, it supports C++11, C++14, C++17, and C++20.

TCP client example:

#include "netlibpp.h"
#include <iostream>
int main() {
    netlibpp::Client Client([](const std::string& error) {
        std::cout << "Error: " << error;
    }, netlibpp::TCP);

    if(Client.has_error())return 1;

    Client.set_target("127.0.0.1", 2030);
    Client.connect();

    while(Client.connected()) {
        Client.send("hello\n");
        auto message = Client.receive(8);
        if(!message.empty()) {
            std::cout << message.data() << " : " << message.size() << "\n";
        }
    }

    return 0;
}

UDP client example:

#include "netlibpp.h"
#include <iostream>

int main() {
    netlibpp::Client Client([](const std::string& error) {
        std::cout << "Error: " << error;
    }, netlibpp::UDP);

    if(Client.has_error())return 1;

    Client.set_target("127.0.0.1", 2031);
    netlibpp::messageType message;

    do {
        Client.send("hello\n");
        message = Client.receive(8);
        if (!message.empty()) {
            std::cout << message.data() << " : " << message.size() << "\n";
        }
    } while(!Client.has_error() && !message.empty());

    return 0;
}
Popular Networking Projects
Popular Network Projects
Popular Networking Categories
Related Searches

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
C Plus Plus
Network
Tcp
Networking
Udp
Header Only
Tcp Server
Tcp Client