Socket.io.on parameter callback is null/undefined


#1

Hi all, for some reason I’m trying to translate licode client into C++, but when I send ‘publish’ signal to licode server, what confuses me is that how the parameter callback is null/undefined,

socket.on(‘publish’, function (options, sdp, callback) {
var id, st;
if (socket.user === undefined || !socket.user.permissions[Permission.PUBLISH]) {
// callback(null, ‘Unauthorized’); // [NODE]: licode server crashed in here
return;
}


}

I‘m stranged to node.js, can anyone tell me what the matter.i…


#2

are you trying to run the basic example or is this your own implementation, can you share more info on what you are doing ?