muduo README

The project's README from github.com/chenshuo/muduo. As one markdown file: README.md.

Muduo is a multithreaded C++ network library based on the reactor pattern.

http://github.com/chenshuo/muduo

Copyright (c) 2010, Shuo Chen. All rights reserved.

Use of this source code is governed by a BSD-style license that can be found in the License file.

Requires: Linux kernel version >= 2.6.28. GCC >= 4.7 or Clang >= 3.5 Boost (for boost::any only.)

Tested on: Debian 7 and above Unbuntu 14.04 and above CentOS 7 and above

Install required packages:

Debian, Ubuntu, etc.

$ sudo apt install g++ cmake make libboost-dev

CentOS

$ sudo yum install gcc-c++ cmake make boost-devel

See .travis.yml for additional packages for building more examples.

To build, run: ./build.sh

See https://github.com/chenshuo/muduo-tutorial for how to use muduo in your project.


| / | | | | \ / |_ _ | |_ _ ___ | |/| | | | |/ ` | | | |/ _
| | | | |
| | (| | || | () | || ||_,|_,|_,_|_
/

muduo (chenshuo/muduo)

concurrent-programming
Searching Database…

16.3K ·GitHub
What is this?Muduo is a multithreaded C++ network library based on the reactor pattern, built for writing high-performance, event-driven servers on Linux.
Is this a standalone server or a library I build on top of?It's a C++ library you link into your own project; you write your server logic on top of its reactor and event-loop primitives rather than running muduo as a standalone app.
How do I build it?Install the required packages for your distro, then run ./build.sh from the repo root to compile the library and examples.
What do I need installed first?A Linux box with GCC 4.7+ or Clang 3.5+, plus cmake, make, and Boost (only used for boost::any). On Debian/Ubuntu that's 'g++ cmake make libboost-dev'; on CentOS 'gcc-c++ cmake make boost-devel'.
Does this run on any OS, or just Linux?Muduo is Linux-only and needs kernel 2.6.28 or newer; there's no Windows or macOS support since it relies on Linux-specific APIs like epoll.
What is the reactor pattern muduo is built around?A single thread waits on multiple socket events (via epoll) and dispatches callbacks; muduo pairs this with one event loop per thread so multithreaded servers scale across CPU cores without a thread-per-connection model.
What distros has it actually been tested on?The README lists Debian 7 and above, Ubuntu 14.04 and above, and CentOS 7 and above as tested platforms.
Does the repo include runnable examples?Yes, it ships example servers and clients; building the full set of examples needs extra packages listed in the project's .travis.yml.
Creator
chenshuo
Size
1.8 MB
Stars
16.3K
Age
16y
Commits · 90 Days