Score
0
Watch 78 Star 184 Fork 60

yedf / handyC++BSD-2-Clause

Clone or download
README-en.md
Copy Edit Web IDE Raw Normal History
yedf   doc updated 2015-08-14
handy[![Build Status](https://travis-ci.org/yedf/handy.png)](https://travis-ci.org/yedf/handy)====
yedf   doc updated 2015-08-14
[中文版](https://github.com/yedf/handy/blob/master/README.md)
yedf   doc updated 2015-08-14
## A C++11 non-blocking network library
yedf   doc updated 2015-08-14
yedf   doc updated 2015-08-14
### multi platform support
yedf   doc updated 2015-08-14
yedf   doc updated 2015-08-14
*   Linux: ubuntu14 64bit g++4.8.1 tested
yedf   doc updated 2015-08-14
yedf   doc updated 2015-08-14
*   MacOSX: LLVM version 6.1.0 tested
yedf   doc updated 2015-08-14
yedf   doc updated 2015-08-14
### elegant program exit
yedf   doc updated 2015-08-14
yedf   doc updated 2015-08-14
programmer can write operations for exit
yedf   doc updated 2015-08-14
yedf   doc updated 2015-08-14
can use valgrind to check memory leak
yedf   doc updated 2015-08-14
yedf   doc updated 2015-08-14
### high performance
yedf   doc updated 2015-08-14
yedf   doc updated 2015-08-14
*   use epoll on Linux
yedf   doc updated 2015-08-14
yedf   doc updated 2015-08-14
*   use kqueue on MacOSX
yedf   doc updated 2015-08-14
yedf   doc updated 2015-08-14
[performance report](http://www.oschina.net/p/c11-handy)
yedf   doc updated 2015-08-14
yedf   doc updated 2015-08-14
### elegant
yedf   doc updated 2015-08-14
yedf   doc updated 2015-08-14
only 10 lines can finish a complete server
yedf   doc updated 2015-08-14
yedf   doc updated 2015-08-14
### sample --echo-server
yedf   doc updated 2015-08-14
```c#include <handy/handy.h>using namespace handy;int main(int argc, const char* argv[]) {
yedf   README updated 2015-08-14
    EventBase base;    Signal::signal(SIGINT, [&]{ base.exit(); });    TcpServerPtr svr = TcpServer::startServer(&base, "", 99);    exitif(svr == NULL, "start tcp server failed");    svr->onConnRead([](const TcpConnPtr& con) {        con->send(con->getInput());
yedf   doc updated 2015-08-14
    });
yedf   README updated 2015-08-14
    base.loop();
yedf   doc updated 2015-08-14
}
yedf   doc updated 2015-08-14
```
yedf   doc updated 2015-08-14
### half sync half async pattern
yedf   doc updated 2015-08-14
yedf   doc updated 2015-08-14
processing I/O asynchronously and Request synchronously can greatly simplify the coding of business processing
yedf   doc updated 2015-08-14
yedf   doc updated 2015-08-14
example can be found examples/hsha.cc
yedf   doc updated 2015-08-14
yedf   doc updated 2015-08-14
### openssl supported
yedf   doc updated 2015-08-14
yedf   update readme 2016-08-14
asynchronously handle the openssl connection. if you have installed openssl, then make will automatically download handy-ssl.ssl support files are in [handy-ssl](https://github.com/yedf/handy-ssl.git) because of license.
yedf   doc updated 2015-08-14
yedf   doc updated 2015-08-14
###protobuf supported
yedf   doc updated 2015-08-14
yedf   doc updated 2015-08-14
examples can be found in directory protobuf###Installation
yedf   doc updated 2015-08-14
    make && make install
yedf   doc updated 2015-08-14
###contents
yedf   doc updated 2015-08-14
yedf   doc updated 2015-08-14
*   handy--------handy library  *   examples---- *   ssl------------openssl support and examples *   protobuf-----protobuf support and examples*   test-----------handy test case  
yedf   doc updated 2015-08-14
yedf   doc updated 2015-08-14
###[hand book](https://github.com/yedf/handy/blob/master/doc-cn.md)
yedf   doc updated 2015-08-14
license====Use of this source code is governed by a BSD-stylelicense that can be found in the License file.email====dongfuye@163.com