All Projects → zhaojh329 → Evmongoose

zhaojh329 / Evmongoose

Licence: gpl-3.0
DEPRECATED. Evmongoose is an asynchronous, event(libev) based multi-protocol embedded networking library with functions including TCP, HTTP, WebSocket, MQTT and much more. It's based on mongoose and libev implementation and it's support Lua API.

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to Evmongoose

Libuhttpd
A very flexible, lightweight and fully asynchronous HTTP server library based on libev and http-parser for Embedded Linux.
Stars: ✭ 302 (+51.76%)
Mutual labels:  openwrt, lede, https
Falcon
A high-performance web server for Ruby, supporting HTTP/1, HTTP/2 and TLS.
Stars: ✭ 2,058 (+934.17%)
Mutual labels:  async, server
Familycloudspeederinshell
[ 天翼家庭云/天翼云盘提速 Shell 版 ] A Shell Implementation of FamilyCloudSpeeder, ESurfing
Stars: ✭ 154 (-22.61%)
Mutual labels:  openwrt, lede
Netjson
NetJSON is a data interchange format for encoding the basic building blocks of networks.
Stars: ✭ 171 (-14.07%)
Mutual labels:  openwrt, lede
Openwrt Shadowsocksr
ShadowsocksR-libev for OpenWrt/LEDE
Stars: ✭ 136 (-31.66%)
Mutual labels:  openwrt, lede
Xluci2
DEPRECATED. xLuCI2 is a JavaScript Webgui for embedded devices running OpenWRT or LEDE
Stars: ✭ 148 (-25.63%)
Mutual labels:  openwrt, lede
Mutual Tls Ssl
🔐 Tutorial of setting up Security for your API with one way authentication with TLS/SSL and mutual mutual authentication for a java based web server and a client with both Spring Boot. Different clients are provided such as Apache HttpClient, OkHttp, Spring RestTemplate, Spring WebFlux WebClient Jetty and Netty, the old and the new JDK HttpClient, the old and the new Jersey Client, Google HttpClient, Unirest, Retrofit, Feign, Methanol, vertx, Scala client Finagle, Featherbed, Dispatch Reboot, AsyncHttpClient, Sttp, Akka, Requests Scala, Http4s Blaze, Kotlin client Fuel, http4k, Kohttp and ktor. Also other server examples are available such as jersey with grizzly. Also gRPC examples are included
Stars: ✭ 163 (-18.09%)
Mutual labels:  server, https
Socket
Non-blocking socket and TLS functionality for PHP based on Amp.
Stars: ✭ 122 (-38.69%)
Mutual labels:  async, server
Xfrps
xfrps fork from frp but mainly use its server side feature and cooperate with xfrp
Stars: ✭ 179 (-10.05%)
Mutual labels:  openwrt, lede
Simple Web Server
A very simple, fast, multithreaded, platform independent HTTP and HTTPS server and client library implemented using C++11 and Boost.Asio. Created to be an easy way to make REST resources available from C++ applications.
Stars: ✭ 2,261 (+1036.18%)
Mutual labels:  server, https
Gear Lib
Gear-Lib, C library for IOT Embedded Multimedia and Network
Stars: ✭ 2,381 (+1096.48%)
Mutual labels:  async, event
Armor
Uncomplicated, modern HTTP server
Stars: ✭ 1,629 (+718.59%)
Mutual labels:  server, https
Guwen Spider
一个完整的nodeJs 串行爬虫 抓取3万多个页面。
Stars: ✭ 129 (-35.18%)
Mutual labels:  async, mongoose
Crossbar
Crossbar.io - WAMP application router
Stars: ✭ 1,957 (+883.42%)
Mutual labels:  mqtt, server
Watsonwebserver
Watson is the fastest, easiest way to build scalable RESTful web servers and services in C#.
Stars: ✭ 125 (-37.19%)
Mutual labels:  server, https
Lear
Linux Engine for Asset Retrieval - speed-profiled C HTTP server
Stars: ✭ 165 (-17.09%)
Mutual labels:  server, https
Gmqtt
Python MQTT v5.0 async client
Stars: ✭ 195 (-2.01%)
Mutual labels:  async, mqtt
Vertx Mqtt
Vert.x MQTT
Stars: ✭ 117 (-41.21%)
Mutual labels:  mqtt, server
Sgf
This is a Smart Game Foundation (Not Framework)
Stars: ✭ 122 (-38.69%)
Mutual labels:  event, server
Lede Ar71xx Optimized Archer C7 V2
TP-Link Archer C7 V2 AC1750 Optimized LEDE Firmware
Stars: ✭ 176 (-11.56%)
Mutual labels:  openwrt, lede

DEPRECATED. Replaced by libuhttpd, libuwsc, libumqttc

Evmongoose(中文)(github)

Evmongoose is an asynchronous, event(libev) based multi-protocol embedded networking library with functions including TCP, HTTP, WebSocket, MQTT and much more. It is based on mongoose and libev implementation and it's support Lua API.

Evmongoose supports highly customized to extend your application. Before I started this project, I had never found a HTTP server library that was satisfied with the event based framework, and those HTTP server libraries could only loop it'sown objects and could not add my own objects. For example, I want to monitor a signal or a file through the event.

Features

  • New from evmongoose

    • Using libev programming
    • Highly customized to extend your application based on libev
    • Lua API(except wrapper for evmongoose and additional include frequently-used posix C API)
  • Inherited from mongoose

    • plain TCP, plain UDP, SSL/TLS (over TCP, one-way or two-way)
    • Alternative openssl and mbedtls
    • HTTP client, HTTP server
    • HTTP File Upload
    • Proxy
    • WebSocket client, WebSocket server
    • MQTT client, MQTT broker
    • CoAP client, CoAP server
    • DNS client, DNS server, async DNS resolver
    • Url Rewrite

Example

How To Compile

For Ubuntu

Install dependency Libraries

  • libev-dev libssl-dev lua5.1 liblua5.1-0-dev lua-zlib

      sudo apt install libev-dev libssl-dev lua5.1 liblua5.1-0-dev lua-zlib
    
  • lua-ev

      git clone https://github.com/brimworks/lua-ev.git
      cd lua-ev
      cmake . -DINSTALL_CMOD=$(lua -e "for k in string.gmatch(package.cpath .. \";\", \"([^;]+)/..so;\") do if k:sub(1,1) == \"/\" then print(k) break end end")
      make && sudo make install
    

Install Evmongoose(HTTPS Support Default)

git clone https://github.com/zhaojh329/evmongoose.git
cd evmongoose
mkdir build
cd build
cmake ../
make && sudo make install

Install Evmongoose(Disable HTTPS Support)

git clone https://github.com/zhaojh329/evmongoose.git
cd evmongoose
mkdir build
cd build
cmake ../ -DHTTPS_SUPPORT=OFF
make && sudo make install

For OpenWRT/LEDE

git clone https://github.com/zhaojh329/lua-ev-openwrt.git
cp -r lua-ev-openwrt openwrt_dir/package/lua-ev

git clone https://github.com/zhaojh329/evmongoose.git
cp -r evmongoose/openwrt openwrt_dir/package/evmongoose

cd openwrt_dir
./scripts/feeds update -a
./scripts/feeds install -a

make menuconfig
Libraries  --->
    Networking  --->
        <*> evmongoose
            Configuration  --->
                SSl (mbedtls)  --->

make package/evmongoose/compile V=s

For General embedded environment

First, cross compile Lua

Cross compile lib-ev

git clone https://github.com/kindy/libev.git
cd libev/src
sh ./autogen.sh
export PATH=/home/zjh/lede/staging_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl/bin:$PATH
./configure --host=mipsel-openwrt-linux --prefix=`pwd`/obj
make && make install

Cross compile Lua-ev

git clone https://github.com/brimworks/lua-ev.git
cd lua-ev
export PATH=/home/zjh/lede/staging_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl/bin:$PATH

# xxxxx is your cross compiler with directories
cmake . -DCMAKE_C_COMPILER=mipsel-openwrt-linux-gcc -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=BOTH -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY -DCMAKE_FIND_ROOT_PATH=xxxxx
make

Cross compile evmongoose

git clone https://github.com/zhaojh329/evmongoose.git
cd evmongoose
export PATH=/home/zjh/lede/staging_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl/bin:$PATH

# xxxxx is your cross compiler with directories
cmake . -DCMAKE_C_COMPILER=mipsel-openwrt-linux-gcc -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=BOTH -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY -DCMAKE_FIND_ROOT_PATH=xxxxx
make

C API reference manual

Evmongoose dose not change the usage of API in mongoose and libev, so please refer to the API Manual of mongoose and libev. Only one thing to notice is that mg_mgr_poll is no longer invoked when using evmongoose.

In addition, evmongoose added a new API: mg_mgr_set_loop, which is used to set libev's loop for Mgr. If the function is not called, the Mgr will use the default loop:EV_DEFAULT.

Lua API reference manual

How To Contribute

Feel free to create issues or pull-requests if you have any problems.

Please read contributing.md before pushing any changes.

Thanks for the following project

If the project is helpful to you, please do not hesitate to star. Thank you!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].