Marfusios/websocket-client

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

zenconix opened this issue · 2 comments

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

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;
});

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