Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to make a websocket test? #11

Open
liufanghua2012 opened this issue Aug 9, 2020 · 4 comments
Open

How to make a websocket test? #11

liufanghua2012 opened this issue Aug 9, 2020 · 4 comments

Comments

@liufanghua2012
Copy link

i tried to modify the following cmd:
mqtt-benchmark --broker tcp://myhost:1883 --count 100 --size 100 --clients 100 --qos 2 --format text

to:
mqtt-benchmark --broker ws://myhost:8083 --count 100 --size 100 --clients 100 --qos 2 --format text

but got errors like:
2020/08/09 02:13:35 Starting client 95
2020/08/09 02:13:35 Starting client 96
2020/08/09 02:13:35 Starting client 97
2020/08/09 02:13:35 Starting client 98
2020/08/09 02:13:35 Starting client 99
2020/08/09 02:13:36 CLIENT 48 had error connecting to the broker: Network Error : websocket: bad handshake
2020/08/09 02:13:36 CLIENT 55 had error connecting to the broker: Network Error : websocket: bad handshake
2020/08/09 02:13:36 CLIENT 98 had error connecting to the broker: Network Error : websocket: bad handshake
2020/08/09 02:13:36 CLIENT 30 had error connecting to the broker: Network Error : websocket: bad handshake
2020/08/09 02:13:36 CLIENT 31 had error connecting to the broker: Network Error : websocket: bad handshake
2020/08/09 02:13:36 CLIENT 72 had error connecting to the broker: Network Error : websocket: bad handshake
......

so, i was wondering hot to make a successful websocket test?

@krylovsk
Copy link
Owner

Unfortunately the tool doesn't support WebSocket connection. Maybe you would be willing to investigate it and prepare a PR?

@YarekTyshchenko
Copy link

--broker ws://myhost/foo. Also works with wss for websockets over TLS

@sreekesh93
Copy link
Contributor

sreekesh93 commented Oct 10, 2022

@krylovsk If this works, can we close this ticket @liufanghua2012 ?

@sreekesh93
Copy link
Contributor

any updates on the state?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants