Giter VIP home page Giter VIP logo

Comments (8)

sonvister avatar sonvister commented on June 14, 2024 1

The implementation of Binance.Api.WebSocket.IWebSocketClient (Binance.Api.WebSocket.WebSocketClient) uses System.Net.WebSocket.ClientWebSocket.

MSDN:
"Some of the classes and class elements in the System.Net.WebSockets namespace are supported on Windows 7, Windows Vista SP2, and Windows Server 2008. However, the only public implementations of client and server WebSockets are supported on Windows 8 and Windows Server 2012. The class elements in the System.Net.WebSockets namespace that are supported on Windows 7, Windows Vista SP2, and Windows Server 2008 are abstract class elements. This allows an application developer to inherit and extend these abstract class classes and class elements with an actual implementation of client WebSockets."

Basically, it is not supported on your platform.

Options:

  1. In VS 2017, in the Binance library NuGet packages, install the latest System.Net.WebSockets.Client package (v4.3.2) to see if any updates add support for Win7 (I have no reason to believe it will support Win7, but I would like to try and find out).

  2. Use an alternative WebSocket implementation library such as WebSocket4Net or WebSocket-Sharp and create a new Binance.Api.WebSocket.IWebSocketClient implementation adapting to the other WebSocket library. Then configure DI to use that implementation instead: services.AddTransient<IWebSocketClient, YourWebSocketClient>(); after calling AddBinance(). This should be able to be done at the application level and not require you to modify the Binance library.

from binance.

sonvister avatar sonvister commented on June 14, 2024

What platform are you using (operating system and .NET version)?

from binance.

mirror222 avatar mirror222 commented on June 14, 2024

thanks for your prompt reply. I am running a Windows 7 64-bit with VS 2017.

from binance.

mirror222 avatar mirror222 commented on June 14, 2024

awesome! Thank you so much, I'll do same tests myself.

from binance.

wjchicago avatar wjchicago commented on June 14, 2024

@sonvister This issue bothers me as well. I can confirm your first suggestion will not kill the problem.

I tried to follow your suggestion (2) to implement a WebSocket4Net or WebSocket-Sharp version, actually I did for both. However none of them works for me.

May I ask you to take a look and if you can spot any obvious mistake? I am running out of idea now.
You can find them here

from binance.

sonvister avatar sonvister commented on June 14, 2024

@mirror222 and @wjchicago, I created implementations (in separate libraries) for both WebSocket4Net and WebSocket-Sharp. The usage is shown (in comments) in BinanceConsoleApp.

from binance.

mirror222 avatar mirror222 commented on June 14, 2024

Thank you for keeping me informed and your professional help.

from binance.

wjchicago avatar wjchicago commented on June 14, 2024

@sonvister Thank you for your effort to make the project better and better!

from binance.

Related Issues (20)

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.