GithubHelp home page GithubHelp logo

tcpdemo's Introduction

TCPDemo

A TCP SDK Demo project based on libev

feature

  1. 使用 libev 实现一个高可用 TCP 服务 SDK
  2. 并设定其基础通信协议
  3. 完成 SDK 使用样例,客户端/服务端

使用 libev 构建 TCP 响应基本流程

  1. 创建 socket
  2. 绑定 socket
  3. 监听 socket
  4. 重建一个 watcher,用来承载 accept 事件
  5. 写一个 callback 用来做实际的 accept 调用
  6. 重建并初始化一个 watcher 用来从 client 中读取请求
  7. 写一个 callback 用来 read
  8. 启动 event loop

tcpdemo's People

Contributors

tron-liu 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.