同步操作将从 yedf/handy 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
Linux: ubuntu14 64bit g++4.8.1 tested
MacOSX: LLVM version 6.1.0 tested
programmer can write operations for exit
can use valgrind to check memory leak
use epoll on Linux
use kqueue on MacOSX
only 10 lines can finish a complete server
#include <handy/handy.h>
using namespace handy;
int main(int argc, const char* argv[]) {
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());
});
base.loop();
}
processing I/O asynchronously and Request synchronously can greatly simplify the coding of business processing
example can be found examples/hsha.cc
asynchronously handle the openssl connection. if you have installed openssl, then make will automatically download handy-ssl. ssl support files are in handy-ssl because of license.
###protobuf supported
examples can be found in directory protobuf
###Installation
make && make install
###contents
###hand book
Use of this source code is governed by a BSD-style license that can be found in the License file.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。