Networklib
multi thread network library using epoll+nonblocking io in C++11
Install / Use
/learn @lianzeng/NetworklibREADME
multiThread network library on linux platform Using C++11
linux multi thread programming in C++11.
1)IO multiplexing: poll, epoll;
2)use nonblock IO, support fd type: socketfd, timerfd, eventfd, listenfd; provide a unify framework for timer,socket,signal processing.
3)one IO/Event loop per thread + reactor(callback), using std::bind + std::function to implement callback;
4)tcp connections are balanced among threads;
5)the tcp server has 1 acceptor thread + event_loop_thread_pool;
6)each tcp connection has 1 owner eventloop thread, other threads operator the connection by adding a task to the ownerloop's taskqueue.
7)test cases could run independently, with valgrind memory detect;
8)User call TcpConnection::send(msg) to send msg, and provide Callback to process peer msg(refer to multiThread/libnet/test/TestEchoClient.cpp).
9).It's easy to learn the message flow from EchoClient.log and EchoServer.log;
This project is build on following environment:
Linux x86_64 Ubuntu 15.04; GCC 4.9.2
Develop Tool used:
Git + Clion_Linux_Version / VScode
Related Skills
node-connect
346.8kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
107.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
346.8kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
346.8kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
