php-binance-api icon indicating copy to clipboard operation
php-binance-api copied to clipboard

Refactor Web Socket code in order to use only one

Open ericol opened this issue 5 years ago • 1 comments

I've been looking at the code here, and was thinking that may be it would make more sense to refactor the code so that all $loop, $react & $connector are reused?

I took a look at the API, and it seems more than one stream can be subscribed to, so it would make sense to have a more "centralized" way of dealing with the web sockets (And also avoid having more than one connection to the web sockets server)

ericol avatar Nov 20 '19 19:11 ericol

I agree. When the library was first designed, there was no combined stream available, every connection had to be made individually. My understanding of websockets in PHP is not very good, I'm used to programming in javascript

jaggedsoft avatar Nov 20 '19 19:11 jaggedsoft