Skip to content
forked from yedf2/handy

简洁易用的C++11网络库 / 支持单机千万并发连接 / a simple C++11 network server framework

License

Notifications You must be signed in to change notification settings

black0592/handy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

handy

a HANDY network C++11 libray on linux.

reactor 模式

支持优雅退出

代码简短

examples


#include "handy.h"
#include "daemon.h"

using namespace std;
using namespace handy;


int main(int argc, const char* argv[]) {
    EventBase base;
    Signal::signal(SIGINT, [&]{ base.exit(); });

    TcpServer echo(&base, Ip4Addr(99));
    echo.onConnRead(
        [](const TcpConnPtr& con) { 
            con->send(con->getInput());
        }
    );
    base.loop();
}

license

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

email

dongfuye at 163 dot com

About

简洁易用的C++11网络库 / 支持单机千万并发连接 / a simple C++11 network server framework

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 94.8%
  • Shell 3.5%
  • Makefile 1.7%