Git Product home page Git Product logo

ws-tool's Introduction

ws-tool

An easy to use websocket client/server toolkit, supporting blocking/async IO.

feature matrix

IO type split proxy(auth) tls deflate use as client use as server
blocking 🚧wip
async 🚧wip

It's tested by autobaha test suit. see examples/autobahn-client

pretty good performance

Roughly compare with EchoSever example, tungstenite, both async and blocking version of ws-tool echo serve win in single client(more then 10) with 1m payload size.

My test machine is i9-12900k and 32GB, 3200MHz ddr4, use uWebSocket provided client example as perf client

server ws-tool ws-tool async uWebSocket tungstenite
msg/sec 5150± 5150± 3200± 2850±

usage

Every example can be run with

cargo run --example <example_name> --all-features

command.

See examples/server for building a websocket echo server with self signed certs.

examples/echo demonstrate how to connect to a wss server.

examples/binance show how to connect via proxy

run autobaha testsuit

start test server

./script/start_autobahn_server.sh

run test on other terminal

cargo run --example autobahn_client --all-features

report files should be under test_reports dir.

autobahn test report

click to expand report

report

TODO

  • add proxy auth config
  • support custom https proxy cert
  • split client into writer & reader

REF

ws-tool's People

Contributors

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