Skip to content
New issue

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

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

Already on GitHub? # to your account

Same request with websocket python library works but not working with websocket-client #123

Open
zenconix opened this issue Jan 4, 2023 · 2 comments

Comments

@zenconix
Copy link

zenconix commented Jan 4, 2023

Hi there,
I am trying to get data from broker. I tried with python's "websocket" library and it works, here is screen capture of python's implementation.
image

But when I try to use same request with this library, I am just receiving ping-pong data, not receiving actual data as below
image

I tried to check in Fiddler, it shows Ping-Pong messages but not receiving actual data from server.
image

@Marfusios
Copy link
Owner

Hey @zenconix ,

are the sent messages identical in Fiddler?

Did you configure the same headers as it is in Python?

using var communicator = new WebsocketClient(url, () =>
{
    var client = new ClientWebSocket();
    client.Options.SetRequestHeader("Origin", "http://stream.stocknote.com:443");
    client.Options.SetRequestHeader("Sec-WebSocket-Key", "XqTD...");
    return client;
});

@xylo987
Copy link

xylo987 commented Apr 7, 2023

微软的System.Net.WebSocket是有bug的库。

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants