-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting "Connection closed before handshake" #48
Comments
@quarkmarino Can you post the node code for comparison? |
@mbonneau Sure in the same manner, it is an adonisJS command 'use strict'
const Command = use('Command')
const Io = use('socket.io-client')('https://streamer.cryptocompare.com/')
class CcMonitor extends Command {
get signature () {
return 'cc:monitor'
}
get description () {
return 'Tell something helpful about this command'
}
* handle (args, options) {
const subscription = ['5~CCCAGG~BTC~USD'];
Io.emit('SubAdd', {subs:subscription} );
Io.on('m', function(data){
console.log(data)
});
}
}
module.exports = CcMonitor and it totally works |
This is not working because Pawl does not implement the socket.io protocol that crytocompare is using. Pawl is only a websocket transport. socket.io is a protocol that runs on top of websockets (or other transports). |
Ohh ok, then I'll have to go with socket.io, thank you for your time @mbonneau |
Hi there, I'm having trouble connecting to the following ws "wss://streamer.cryptocompare.com"
docs here, https://www.cryptocompare.com/api/#-api-web-socket-
my implementation is the following
Btw, I'm running it on a laravel command "handle()' method
basically the same first example from the docs, now, I've already got another working ws client in another project, however, in that other project I had to toy around with the headers, but this time, I haven't been able to make it work, also, I managed to implement this exact endpoint in nodejs using socket.io as a proof of concept, and it worked perfectly!, but really need to make it work on php
any idea, where it could be breaking, or where exactly to look at?
The text was updated successfully, but these errors were encountered: