1 Star 0 Fork 0

lidedongsn/handy-test

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
echo.cc 359 Bytes
一键复制 编辑 原始数据 按行查看 历史
lidedongsn 提交于 2016-12-29 23:06 +08:00 . add echo
#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, "", 9527);
exitif(svr == NULL, "start tcp server failed");
svr->onConnRead([](const TcpConnPtr& con) {
con->send(con->getInput());
});
base.loop();
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/lidecoolblue/handy-test.git
git@gitee.com:lidecoolblue/handy-test.git
lidecoolblue
handy-test
handy-test
master

搜索帮助