php-binance-api
php-binance-api copied to clipboard
Refactor Web Socket code in order to use only one
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)
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