sim:简单的C ++网络服务器框架

时间:2021-04-12 21:19:20
【文件属性】:
文件名称:sim:简单的C ++网络服务器框架
文件大小:43KB
文件格式:ZIP
更新时间:2021-04-12 21:19:20
C++ sim卡 C ++网络服务器框架,对nc和telnet友好。 演示 #include "sim/sim.h" class MyHandler : public sim::Handler { public: virtual sim::HandlerState proc(const sim::Request &req, sim::Response *resp){ std::string cmd = req.msg.type(); if(cmd == "ping"){ resp->msg.add("ok"); resp->msg.add("pong"); }else{ resp->msg.add("ok"); resp->msg.add(cmd); } return this->resp(); } }; int main(int argc, cha
【文件预览】:
sim-master
----.gitignore(111B)
----README.md(779B)
----build.sh(1KB)
----test()
--------test_client.cpp(617B)
--------test_app.conf(92B)
--------test.cpp(108B)
--------bench_client.cpp(2KB)
--------test_msg.cpp(1KB)
--------simple_server.cpp(671B)
--------test_link.cpp(749B)
--------test_server.cpp(3KB)
--------Makefile(535B)
--------test_app.cpp(486B)
----LICENSE(1KB)
----api()
--------php()
--------cpp()
----src()
--------fde.cpp(595B)
--------server.h(803B)
--------handler.cpp(777B)
--------server.cpp(6KB)
--------fde_select.cpp(2KB)
--------decoder.h(705B)
--------decoder.cpp(2KB)
--------client()
--------fde.h(2KB)
--------message.cpp(2KB)
--------message.h(752B)
--------sim.cpp(2KB)
--------sim.h(685B)
--------fde_epoll.cpp(3KB)
--------Makefile(863B)
--------link.h(1KB)
--------link.cpp(5KB)
--------util()
--------handler.h(2KB)
----Makefile(152B)

网友评论