Reading thru the socketIO spec for formatting messages, still a bit confused about how I would simply create a custom ‘swipe’ event
The following doesn’t work(but SHOULD according to the specs!)
op('websocket1').sendText("5:1::{'name':'swipe','args': ['hello']}")
github.com/LearnBoost/socket.io-spec
Am I not understanding the spec properly?
Is there a simple .toe somewhere with a properly function websocket-socketIO DAT I can reference?
I can get messages returned correctly from echo.websocket.org,
and I at least get an ACK(acknowledgement) returned from my socketIOserver
but the problem is how do I send and receive custom events??
In my server.js file I have
io.sockets.on('connection', function (socket) {
socket.emit('news', { hello: 'from socket server' });
socket.on('swipe', function (data) {
socket.emit(swipe received by server');
console.log(data);
});
So you can see I am simply trying to listen for a custom ‘swipe’ event.
Help!!!