Coder Social home page Coder Social logo

object-identify-svr's Introduction

SVR for object-identify

工程不使用第三方库,网络请求从 System Call 和 Standard C Library Function 写起.

使用 Epoll + NetThreads + WorkerThreads 模型.

编译方法

UNIX

$ git clone --recursive https://github.com/xingyuuchen/object-identify-SVR.git
$ cd object-identify-SVR/scripts
$ bash autogen.sh

仅编译

$ bash cmake.sh

编译运行

$ bash cmake.sh -r

以守护进程形式运行

$ bash cmake.sh -r -d   # -d: run as a daemon.

使用方法

每一个网络接口使用一个类来表示。它们都间接继承自NetSceneBase类。 你可以把这个类比做一个Servlet来便于理解。

若使用Protobuf来序列化数据,请继承自NetSceneProtobuf,使用POST请求。

若想自定义网络通信协议,请继承自NetSceneCustom类。支持GET, POST。

定义好你的接口类并实现好具体的业务逻辑后,请将接口类注册给框架:使用 NetSceneDispatcher::Instance::RegisterNetScene()方法。

然后你可以更改配置文件webserverconf.yml来定制一些配置, 再像我一样,调用WebServer::Instance().Serve()就能快乐地开启服务了!

object-identify-svr's People

Contributors

xingyuuchen avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.