LearnBoost/socket.io — Issue #710: packet.ack = lastArg.length ? 'data' : true;   in socket.js
Author: zzo
Created: 2012-01-06 01:21:02+00:00
State: open

can this code just be:

packet.ack = 'data'???

We're already in the emit block NOT the send block so the user HAS supplied a callback function - does it matter if it takes any parameters or not??

Since we're in 'emit' the 'ack is done by you' sez the doc...

The REAL issue I'm having is broadcasting of events with ack functions DOES NOT WORK because of this (the ack function gets turned into a zero-length function & therefore does not get passed correctly down the socket)...

I would like to hear WHY the code is as it's written - must be something I don't understand & would like to understand it- thanks!!!