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

websocket

Open tudoavinfo opened this issue 3 years ago • 5 comments

Connection refused {"exception":"[object] (Exception(code: 0): Connection refused at /var/www/ltdempire/vendor/workerman/globaldata/src/Client.php:69)

tudoavinfo avatar Feb 05 '22 20:02 tudoavinfo

+1 same error

wooly-booly avatar Feb 06 '22 21:02 wooly-booly

@tudoavinfo @wooly-booly Is there a more detailed code example?

zhouaini528 avatar Feb 07 '22 01:02 zhouaini528

solved it was bad formatting of the sent data

tudoavinfo avatar Feb 09 '22 18:02 tudoavinfo

But on the server I have this error:

`Call to undefined function GuzzleHttp\Psr7\uri_for()

at public_html/vendor/ratchet/pawl/src/Connector.php:126 122▕ * @throws \InvalidArgumentException 123▕ * @return \Psr\Http\Message\RequestInterface 124▕ */ 125▕ protected function generateRequest($url, array $subProtocols, array $headers) { ➜ 126▕ $uri = gPsr\uri_for($url); 127▕ 128▕ $scheme = $uri->getScheme(); 129▕ 130▕ if (!in_array($scheme, ['ws', 'wss'])) {`

tudoavinfo avatar Feb 09 '22 18:02 tudoavinfo

But on the server I have this error:

`Call to undefined function GuzzleHttp\Psr7\uri_for()

at public_html/vendor/ratchet/pawl/src/Connector.php:126 122▕ * @throws \InvalidArgumentException 123▕ * @return \Psr\Http\Message\RequestInterface 124▕ */ 125▕ protected function generateRequest($url, array $subProtocols, array $headers) { ➜ 126▕ $uri = gPsr\uri_for($url); 127▕ 128▕ $scheme = $uri->getScheme(); 129▕ 130▕ if (!in_array($scheme, ['ws', 'wss'])) {`

I don't know the reason for this error. I used GuzzleHttp. I guess if it is a problem with the PHP environment?

zhouaini528 avatar Feb 10 '22 01:02 zhouaini528