{"id":15047416,"url":"https://github.com/ironsdu/brynet","last_synced_at":"2025-04-08T09:07:55.458Z","repository":{"id":3108572,"uuid":"12886890","full_name":"IronsDu/brynet","owner":"IronsDu","description":"A Header-Only cross-platform  C++ TCP network library . We can use vcpkg(https://github.com/Microsoft/vcpkg/tree/master/ports/brynet) install  brynet.","archived":false,"fork":false,"pushed_at":"2024-08-25T11:30:23.000Z","size":2121,"stargazers_count":1051,"open_issues_count":28,"forks_count":239,"subscribers_count":68,"default_branch":"master","last_synced_at":"2024-10-29T15:47:29.379Z","etag":null,"topics":["c-plus-plus","cpp11","cross-platform","header-only","http","https","multithreading","networking","tcp-library","websocket"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/IronsDu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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":"2013-09-17T05:18:48.000Z","updated_at":"2024-10-26T12:22:50.000Z","dependencies_parsed_at":"2024-10-12T16:41:00.884Z","dependency_job_id":"dae7ac13-255d-4894-b9a5-6cf112c0ef82","html_url":"https://github.com/IronsDu/brynet","commit_stats":{"total_commits":451,"total_committers":17,"mean_commits":"26.529411764705884","dds":0.09977827050997778,"last_synced_commit":"3276e1c754ec80742db5f2a548d584aa5a31baad"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IronsDu%2Fbrynet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IronsDu%2Fbrynet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IronsDu%2Fbrynet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IronsDu%2Fbrynet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IronsDu","download_url":"https://codeload.github.com/IronsDu/brynet/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247809962,"owners_count":20999816,"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","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":["c-plus-plus","cpp11","cross-platform","header-only","http","https","multithreading","networking","tcp-library","websocket"],"created_at":"2024-09-24T20:58:03.573Z","updated_at":"2025-04-08T09:07:55.434Z","avatar_url":"https://github.com/IronsDu.png","language":"C++","readme":"Brynet\n=======\nHeader Only Cross platform high performance TCP network library using C++ 11.\n\n[![996.icu](https://img.shields.io/badge/link-996.icu-red.svg)](https://996.icu)\n[![LICENSE](https://img.shields.io/badge/license-NPL%20(The%20996%20Prohibited%20License)-blue.svg)](https://github.com/996icu/996.ICU/blob/master/LICENSE)\n[![Platform](https://img.shields.io/badge/Platform-Linux,%20Windows,%20MacOS-green.svg?style=flat-square)](https://github.com/IronsDu/brynet)\n\n## Build status\n[![build-and-test](https://github.com/IronsDu/brynet/actions/workflows/build-and-test.yml/badge.svg)](https://github.com/IronsDu/brynet/actions/workflows/build-and-test.yml)\n\n## Features\n* Header only\n* Cross platform (Linux | Windows | MacOS)\n* High performance and safety use.\n* None depend\n* Multi-threaded\n* SSL support\n* Support HTTP、HTTPS、WebSocket\n* IPv6 support\n\n## Documentation\n- [简体中文](https://github.com/IronsDu/brynet/blob/master/docs/main.zh-cn.md)\n\n## Compatibility\n* Visual C++ 2013+ (32/64-bit)\n* GCC 4.8+ (32/64-bit)\n* Clang (Supported C++ 11)\n\n## Macro\n* BRYNET_VERSION\n* BRYNET_USE_OPENSSL\n\n\n## Build Example\n1. `cmake . -Dbrynet_BUILD_EXAMPLES=ON -Dbrynet_BUILD_TESTS=ON`\n2. If you use Windows, please open brynet.sln then build. If on Linux or MacOS, only enter `make`.\n\n## Only Install\n1. `cmake .`\n2. `sudo make install`\n\n## Usages\n* [Examples](#examples)\n* [Users](#users)\n\n## Benchmark\n   Under localhost, use CentOS 6.5 virtual mahcine(host machine is Win10 i5)\n* PingPong\n\n  Benchamrk's server and client both only use one thread, and packet size is 4k\n\n  ![PingPong](image/pingpong.png \"PingPong\")\n\n* Broadcast\n\n  Server use two network threads and one logic thread, client use one network(also process logic) thread. every packet size is 46 bytes.\n  every packet contain client's id.\n  server broadcast packet to all client when recv one packet from any client.\n  client send one packet when recv packet from server and packet's id equal self.\n\n  ![Broadcast](image/broadcast.png \"Broadcast\")\n\n* Ab HTTP(1 network thread)\n```\n    Server Hostname:        127.0.0.1\n    Server Port:            9999\n  \n    Document Path:          /abc/de?a=1\n    Document Length:        25 bytes\n    \n    Concurrency Level:      100\n    Time taken for tests:   17.734 seconds\n    Complete requests:      500000\n    Failed requests:        0\n    Total transferred:      41000000 bytes\n    HTML transferred:       12500000 bytes\n    Requests per second:    28194.36 [#/sec] (mean)\n    Time per request:       3.547 [ms] (mean)\n    Time per request:       0.035 [ms] (mean, across all concurrent requests)\n    Transfer rate:          2257.75 [Kbytes/sec] received\n    \n    Connection Times (ms)\n    min  mean[+/-sd] median   max\n    Connect:        0    2   0.2      2       3\n    Processing:     1    2   0.3      2       7\n    Waiting:        0    1   0.4      1       6\n    Total:          2    4   0.2      4       7\n    \n    Percentage of the requests served within a certain time (ms)\n    50%      4\n    66%      4\n    75%      4\n    80%      4\n    90%      4\n    95%      4\n    98%      4\n    99%      4\n    100%      7 (longest request)\n```\n\nExamples\n----------------------------\n* [PingPongServer](https://github.com/IronsDu/dodo/blob/master/examples/PingPongServer.cpp)\n* [PingPongClient](https://github.com/IronsDu/dodo/blob/master/examples/PingPongClient.cpp)\n* [BroadCastServer](https://github.com/IronsDu/dodo/blob/master/examples/BroadCastServer.cpp)\n* [BroadCastClient](https://github.com/IronsDu/dodo/blob/master/examples/BroadCastClient.cpp)\n* [Http\u0026Websocket Server](https://github.com/IronsDu/dodo/blob/master/examples/HttpServer.cpp)\n* [HttpServerClient](https://github.com/IronsDu/dodo/blob/master/examples/HttpClient.cpp)\n* [BenchWebsocket](https://github.com/IronsDu/dodo/blob/master/examples/BenchWebsocket.cpp) benchmark websocket client\n* [PromiseReceive](https://github.com/IronsDu/brynet/blob/master/examples/PromiseReceive.cpp) use the promise style receive http response\n* [WebSocketProxy](https://github.com/IronsDu/dodo/blob/master/examples/WebBinaryProxy.cpp) one proxy server between websocket client and binary protocol server\n* more examples please see [examples](https://github.com/IronsDu/dodo/tree/master/examples);\n\nUsers\n----------------------------\n* [Redis proxy](https://github.com/IronsDu/DBProxy)\n* [gayrpc](https://github.com/IronsDu/gayrpc)\n* [gaylord - distributed virtual actor framework](https://github.com/IronsDu/gaylord)\n* [Joynet - Lua network library](https://github.com/IronsDu/Joynet)\n* [grpc-gateway](https://github.com/IronsDu/grpc-gateway)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fironsdu%2Fbrynet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fironsdu%2Fbrynet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fironsdu%2Fbrynet/lists"}