Websocket how? - page 24

 
Alexei's reasoning is logical
 
Maxim Kuznetsov:

On the design side: everything is much simpler - @Fedor Arkhipov(topic author and initiator) declares "I want it to be like that, but right now we need Hibou". And small/agreed corrections from us poor people :-) Because he is the one who knows what the whole idea is about.

I for one am not clear on the meaning of many classes, but that's my gripes...

You need to get the thing in the most compact form - you got an intelligible answer and even a thread, and you solved the bugs. You can have hundreds of hierarchies of classes and methods :-)

Let me try to answer as I understood you....

Yes, you can create one single Huobi class (by broker's name) and cram everything in it, both addressing to web socket and processing of answers parsing requests, you will end up with huge file, which is basically impossible to understand or to deal with a litre of vodka. So dividing the functionality into classes looks quite logical. Each class performs its own function. C# is an absolute OOP, it has no procedural programming at all, everything is written in classes. But you can create the illusion of procedural programming using static classes. So consider that we just separate different functions from one file.

The author of the topic knows what he wants in the end, but he doesn't know how to achieve it. In some cases he does not even have a good idea of how sockets work.

Of course, you can do as other comrades did: "here are links on habor and wiki and who knows where else, everything was solved for you long ago, go smoke material.....".

Maxim, this kind of "help" is provided by 90% of forum members. When I see it myself it makes me cringe. And where is the mutual help? What is the purpose of this forum? But come on, it's all psychological aspects, let's not talk about it.

Only those who post their knowledge in the form of articles, and they are the only ones who actually help all the participants of the forum, while others are just showing off. How far has Fedor advanced with the help that he received from other participants of the topic?

Oh, okay, enough with the lyrics.

Damn, Maxim turned off all the heat with his "rebuke"... That's basically how it ends. The one who wants to provide real help is covered in slop, and they themselves with the so-called "help", after a little yapping, get out of the way. In the end: the asker remains unanswered, some users show off and get lost, and someone gets shit on... that is, there is NULL profit to be had.

 

All done, it doesn't swear.

 
Алексей Барбашин:

Let me try to answer as I understood you....

Yes, you can create one single class Huobi (by broker's name) and cram everything into it, both referring to the web socket and processing responses parsing queries, you end up with a fucking file that is basically impossible to figure out or figure out with a litre of vodka. So dividing the functionality into classes looks quite logical. Each class performs its own function. C# is an absolute OOP, it has no procedural programming at all, everything is written in classes. But you can create the illusion of procedural programming using static classes. So consider that we just separate different functions from one file.

The author of the topic knows what he wants in the end, but he doesn't know how to achieve it. In some cases he does not even have a good idea of how sockets work.

Of course, you can do as other comrades did: "here are links on habor and wiki and who knows where else, everything was solved for you long ago, go smoke material.....".

Maxim, this kind of "help" is provided by 90% of forum members. When I see it myself it makes me cringe. And where is the mutual help? What is the purpose of this forum? But come on, it's all psychological aspects, let's not talk about it.

Only those who post their knowledge in the form of articles, and they are the only ones who actually help all the participants of the forum, while others are just showing off. How far has Fedor advanced with the help that he received from other participants of the topic?

Oh, okay, enough with the lyrics.

Damn, Maxim turned off all the heat with his "rebuke"... That's basically how it ends. The one who wants to provide real help is covered in slop, and they themselves with the so-called "help", after a little yapping, get out of the way. In the end: the asker remains unanswered, some users show off and get lost, and someone gets shit on... that's NULL in profit.

the yapping was about me in this thread ? Alexei, you're tired...

and about further - what the hell classes until you know how to decompress server messages ? what the hell are you doing...

the customer wants a specific thing, has tales of awesome C#. HOW many days has it been since the topic was published ? and the amount of code, and the result ?

 
Maxim Kuznetsov:

was that about me in this thread about yapping? Alexei, you're tired...

and about further - what the hell classes while you can't unpack server messages ? what the hell are you doing...

the customer wants a specific thing, has tales of awesome C#. HOW many days has it been since the topic was published ? and the amount of code, and the result ??

Well said... I'll bail, and you, as an experienced specialist, will bring the customer to a logical solution with the methods you know how to use.

 
There is no need to quarrel. There is no need to quarrel because it does not lead to anything good.
 
Алексей Барбашин:

Well said... I'll step aside, and you, as an experienced professional, will bring the customer to a logical solution with the methods you know how to use.

No Alexei, you're on your own - you should do it. I'm simply pointing at the right direction - to a specific solution. It seems to me that I am right.

Otherwise you drift away to "constructing classes" when technological problems abound.

I repent - I can be harsh and intemperate...

PS/ creating + taking out a static Hibou method is more than debatable. Could probably be a derived class - but that's all later, once it starts "breathing a little"

PPS/ I get banned for my decisions :-)

 
Алексей Барбашин:
...

There is also a request for the same quote broadcast for Binance

Do all exchanges have identical protocol between server and client? I'm sure there won't be a one-size-fits-all solution. Going to githab again, and finding https://github.com/binance-exchange/binacpp in a couple of minutes.

Apparently people have too much free time, I'm jealous.

binance-exchange/binacpp
binance-exchange/binacpp
  • binance-exchange
  • github.com
and -L and -l for linker to link against shared libraries. . Then compile like this: And export LD_LIBRARY_PATH and run like this: You can refer to the following Makefile to get a better picture...
 
Vict:

Do all exchanges have an identical protocol between server and client? I'm sure there won't be a one-size-fits-all solution. Again I go to githab, and find https://github.com/binance-exchange/binacpp in a couple of minutes.

Apparently people have too much free time, I envy them.

The protocol itself is the same for all, the implementation of API requests is different for all.
You know, studying someone else's library is not kamilfo.
It is easier to write your own, and understand where everything is.
All the more, API documentation is constantly updated with new methods, and corrections need to be made.
I, too, have investigated various ready-made solutions, finally gave up and wrote my own library in C).

 
Roman:

The protocol itself is the same for all, the implementation of API requests is different for all.
To study someone else's library, you know, is not kamilfo.
It is easier to write your own, and understand where everything is.
All the more, API documentation is constantly updated with new methods, and corrections need to be made.
I had investigated different ready-made solutions, finally gave up and wrote my own library in C)).

I mean not network protocol (websockets), but conventions on next level about form of requests/responses, which are built on them.

Looking at the huobi lib, it took me about five minutes to understand the basic principles of data retrieval. I don't think it's complicated.