I'm trying to use SocketIO4Net for communication with my NodeJS server. As mentioned by the NodeJS SocketIO doc, we can do something like:
var io = require('socket.io').listen(80);
io.sockets.on('connection', function (socket) {
socket.on('ferret', function (name, fn) {
fn('woot');
});
});
Where there's a fn refers to a callback function. I need equivalent function in SocketIO4Net but I can't find it any where. Only 2 signatures I found here are:
public virtual void On(string eventName, Action<IMessage> action);
public virtual void On(string eventName, string endPoint, Action<IMessage> action);
So I'm wondering, is this function available in SocketIO4Net? Or do I have to emit another event to confirm with the server?