Open v29neil opened 7 years ago
sockjs doesn't implement .on and .emit from the "getting started" here: https://github.com/sockjs/sockjs-client#getting-started
@fippo Yea , i saw that. Thats why i created the file sockjsconnection file . Does that mean this library does not support sockjs client ????
@v29neil I just started fitting sockjs into this.
Creating the sockjsconnection.js
file as you did is not enough because the socketio's emit() does not translate to sockjs' send(). You need to map emit() to send(), fitting the arguments properly (read: properly crafting the data you send). It will be easy to do it once you choose your STUN/TURN server-side implementation.
I am trying to use sockjs on client side and server side both. I created a file
sockjsconnection.js
, which is similar likesocketioconnection.js
Inside sockjsconnection.js I defined four standard functions just like insocketioconnection.js
On index.html I included
Then ,
I get this strange error connection.on is not a function which should not happen.(screenshot attached )
Has anyone tried this library with sockjs????