#99 `packet` event #113

Merged
merged 1 commit into from Nov 5, 2012

2 participants

@Jxck

Added packet event to socket.

but I need more detail about packetCreate for implement.

@rauchg

Perfect, thanks @Jxck

@rauchg rauchg merged commit 95f0614 into socketio:master Nov 5, 2012
@rauchg

https://github.com/LearnBoost/engine.io/blob/master/lib/socket.js#L275

packetCreate would be emitted with the object passed to writeBuffer there.
Essentially:

var packet = { type: type, data: data };
this.emit('packetCreate', packet);

This would allow 3rd parties to modify / examine outgoing packets

@Jxck

ah, I see.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment