{"id":21807609,"url":"https://github.com/zhaojh329/evmongoose","last_synced_at":"2025-08-20T20:33:34.288Z","repository":{"id":90322900,"uuid":"92413073","full_name":"zhaojh329/evmongoose","owner":"zhaojh329","description":"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.","archived":false,"fork":false,"pushed_at":"2018-01-14T04:08:43.000Z","size":1042,"stargazers_count":213,"open_issues_count":0,"forks_count":55,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-04-07T20:56:18.458Z","etag":null,"topics":["async","cgi","dns-resolver","event","evhttp","evmongoose","evmqtt","http","https","lede","libev","lua-http","lua-mqtt","lua-server","lua-web","mongoose","mqtt","openwrt","server","web"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zhaojh329.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"contributing.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-05-25T14:44:22.000Z","updated_at":"2024-09-29T15:36:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"65a57269-a5a7-4f2d-bdad-edf4f845ed2a","html_url":"https://github.com/zhaojh329/evmongoose","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/zhaojh329/evmongoose","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhaojh329%2Fevmongoose","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhaojh329%2Fevmongoose/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhaojh329%2Fevmongoose/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhaojh329%2Fevmongoose/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zhaojh329","download_url":"https://codeload.github.com/zhaojh329/evmongoose/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhaojh329%2Fevmongoose/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271378718,"owners_count":24749199,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-20T02:00:09.606Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["async","cgi","dns-resolver","event","evhttp","evmongoose","evmqtt","http","https","lede","libev","lua-http","lua-mqtt","lua-server","lua-web","mongoose","mqtt","openwrt","server","web"],"created_at":"2024-11-27T12:46:39.264Z","updated_at":"2025-08-20T20:33:33.972Z","avatar_url":"https://github.com/zhaojh329.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"[libuhttpd]: https://github.com/zhaojh329/libuhttpd\n[libuwsc]: https://github.com/zhaojh329/libuwsc\n[libumqttc]: https://github.com/zhaojh329/libumqttc\n\n# DEPRECATED.  Replaced by [libuhttpd], [libuwsc], [libumqttc] \n\n# Evmongoose([中文](https://github.com/zhaojh329/evmongoose/blob/master/README_ZH.md))([github](https://github.com/zhaojh329/evmongoose))\n\n![](https://img.shields.io/badge/license-GPLV3-brightgreen.svg?style=plastic \"License\")\n\n![](https://github.com/zhaojh329/image/blob/master/evmongoose.png)\n\nEvmongoose is an asynchronous, event(libev) based multi-protocol embedded networking library \nwith functions including TCP, HTTP, WebSocket, MQTT and much more. It is based on [mongoose](https://github.com/cesanta/mongoose)\nand [libev](https://github.com/kindy/libev) implementation and it's support Lua API.\n\nEvmongoose supports highly customized to extend your application. Before I started this project, I had never found a HTTP server\nlibrary that was satisfied with the event based framework, and those HTTP server libraries could only loop it'sown objects and \ncould not add my own objects. For example, I want to monitor a signal or a file through the event.\n\n# Features\n* New from evmongoose\n    - Using libev programming \n\t- Highly customized to extend your application based on libev\n\t- Lua API(except wrapper for evmongoose and additional include frequently-used posix C API)\n\n* Inherited from mongoose\n\t- plain TCP, plain UDP, SSL/TLS (over TCP, one-way or two-way)\n\t- Alternative openssl and mbedtls\n\t- HTTP client, HTTP server\n\t- HTTP File Upload\n\t- Proxy\n\t- WebSocket client, WebSocket server\n\t- MQTT client, MQTT broker\n\t- CoAP client, CoAP server\n\t- DNS client, DNS server, async DNS resolver\n\t- Url Rewrite\n\n# [Example](https://github.com/zhaojh329/evmongoose/blob/master/example)\n* [simplest web](https://github.com/zhaojh329/evmongoose/blob/master/example/simplest_web.c)\n* [simplest web on ssl](https://github.com/zhaojh329/evmongoose/blob/master/example/simplest_web_ssl.c)\n* [http client](https://github.com/zhaojh329/evmongoose/blob/master/example/http_client.c)\n* [async DNS resolver](https://github.com/zhaojh329/evmongoose/blob/master/example/async_dns_resolver.c)\n* [Lua](https://github.com/zhaojh329/evmongoose/blob/master/example/lua)\n\n# How To Compile\n## For Ubuntu\n### Install dependency Libraries\n* libev-dev libssl-dev lua5.1 liblua5.1-0-dev lua-zlib\n\n\t\tsudo apt install libev-dev libssl-dev lua5.1 liblua5.1-0-dev lua-zlib\n\n* lua-ev\n\n\t\tgit clone https://github.com/brimworks/lua-ev.git\n\t\tcd lua-ev\n\t\tcmake . -DINSTALL_CMOD=$(lua -e \"for k in string.gmatch(package.cpath .. \\\";\\\", \\\"([^;]+)/..so;\\\") do if k:sub(1,1) == \\\"/\\\" then print(k) break end end\")\n\t\tmake \u0026\u0026 sudo make install\n    \n### Install Evmongoose(HTTPS Support Default)\n    git clone https://github.com/zhaojh329/evmongoose.git\n    cd evmongoose\n    mkdir build\n    cd build\n    cmake ../\n    make \u0026\u0026 sudo make install\n\n### Install Evmongoose(Disable HTTPS Support)\n    git clone https://github.com/zhaojh329/evmongoose.git\n    cd evmongoose\n    mkdir build\n    cd build\n    cmake ../ -DHTTPS_SUPPORT=OFF\n    make \u0026\u0026 sudo make install\n\n## For OpenWRT/LEDE\n\tgit clone https://github.com/zhaojh329/lua-ev-openwrt.git\n\tcp -r lua-ev-openwrt openwrt_dir/package/lua-ev\n\t\n\tgit clone https://github.com/zhaojh329/evmongoose.git\n\tcp -r evmongoose/openwrt openwrt_dir/package/evmongoose\n\t\n\tcd openwrt_dir\n\t./scripts/feeds update -a\n\t./scripts/feeds install -a\n\t\n\tmake menuconfig\n\tLibraries  ---\u003e\n\t    Networking  ---\u003e\n\t        \u003c*\u003e evmongoose\n\t            Configuration  ---\u003e\n\t                SSl (mbedtls)  ---\u003e\n\t\n\tmake package/evmongoose/compile V=s\n\n## For General embedded environment\n### [First, cross compile Lua](https://github.com/zhaojh329/lua-5.1.5-mod)\n\n### Cross compile lib-ev\n\tgit clone https://github.com/kindy/libev.git\n\tcd libev/src\n\tsh ./autogen.sh\n\texport PATH=/home/zjh/lede/staging_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl/bin:$PATH\n\t./configure --host=mipsel-openwrt-linux --prefix=`pwd`/obj\n\tmake \u0026\u0026 make install\n\t\n### Cross compile Lua-ev\n\tgit clone https://github.com/brimworks/lua-ev.git\n\tcd lua-ev\n\texport PATH=/home/zjh/lede/staging_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl/bin:$PATH\n\t\n\t# xxxxx is your cross compiler with directories\n\tcmake . -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\n\tmake\n\t\n### Cross compile evmongoose\n\tgit clone https://github.com/zhaojh329/evmongoose.git\n    cd evmongoose\n\texport PATH=/home/zjh/lede/staging_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl/bin:$PATH\n\t\n\t# xxxxx is your cross compiler with directories\n\tcmake . -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\n\tmake\n\t\n# C API reference manual\nEvmongoose dose not change the usage of API in mongoose and libev, \nso please refer to the API Manual of [mongoose](https://docs.cesanta.com/mongoose/master) and libev.\nOnly one thing to notice is that mg_mgr_poll is no longer invoked when using evmongoose.\n\nIn addition, evmongoose added a new API: mg_mgr_set_loop, which is used to set libev's loop for Mgr.\nIf the function is not called, the Mgr will use the default loop:EV_DEFAULT.\n\n# [Lua API reference manual](https://github.com/zhaojh329/evmongoose/wiki/Lua-API-reference-manual)\n\n# How To Contribute\nFeel free to create issues or pull-requests if you have any problems.\n\n**Please read [contributing.md](https://github.com/zhaojh329/evmongoose/blob/master/contributing.md)\nbefore pushing any changes.**\n\n# Thanks for the following project\n* [mongoose](https://github.com/cesanta/mongoose)\n* [libev](https://github.com/kindy/libev)\n* [lua-ev](https://github.com/brimworks/lua-ev)\n* [lua-mongoose](https://github.com/shuax/lua-mongoose)\n\n# If the project is helpful to you, please do not hesitate to star. Thank you!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhaojh329%2Fevmongoose","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzhaojh329%2Fevmongoose","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhaojh329%2Fevmongoose/lists"}