When I setup my listener for the P2P connection and pass a function callback using emit, I would expect the P2P API to work just like the socket.io API. In which case I would expect the callback argument of the on handler would be populated with a function. Instead I get a null.
//client
p2p.emit('some-event,function(result){
console.log(result);
});
//server
p2p.on('some-event',function(callback){
callback('got message'); //when using socket.io-p2p, the callback is always null
});
When I setup my listener for the P2P connection and pass a function callback using emit, I would expect the P2P API to work just like the socket.io API. In which case I would expect the callback argument of the on handler would be populated with a function. Instead I get a null.