GithubHelp home page GithubHelp logo

new-economy / asnw Goto Github PK

View Code? Open in Web Editor NEW

This project forked from viabtc/asnw

0.0 2.0 0.0 73 KB

A high performance asynchronous network programming library base on libev and in c

License: MIT License

Makefile 0.90% C 99.10%

asnw's Introduction

ASNW: asynchronous network

A high performance asynchronous network programming library based on libev and in C.

Network including the following modules:

  • nw_buf : buf manager
  • nw_evt : main loop
  • nw_sock : socket releated
  • nw_ses : network session manager
  • nw_timer : timer, call a function after specify time, repeat or not repeat
  • nw_svr : server implement, one server can bind multi address in different sock type
  • nw_clt : client implement, auto reconnect
  • nw_state : state machine with timeout
  • nw_job : thread pool

example

  • echo_server : a single process server

see test/echo_server.c

./echo_server '[email protected]:1234' 'stream@/tmp/echo_stream.sock'
  • listener_worker: one process listen, multi process process connection

see test/listener_worker.c

./listener_worker '[email protected]:1234' 10

wrapper

Network is a very basic network programming library, but you can wrapper the basic nw_clt and nw_svr to be more complex.

wrapper/ut_rpc is a wrapper example.

asnw's People

Contributors

haipome avatar

Watchers

 avatar  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.