From f84c4d51b36bdf94c04711965eee24bc43bf31fb Mon Sep 17 00:00:00 2001 From: Arnout Kazemier Date: Wed, 15 Jun 2011 21:49:46 +0200 Subject: [PATCH] Handle onConnect --- lib/transport.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/lib/transport.js b/lib/transport.js index 595a7f4f..c1e2d0bc 100644 --- a/lib/transport.js +++ b/lib/transport.js @@ -72,6 +72,10 @@ return this.onDisconnect(); } + if (packet.type == 'connect' && packet.endpoint == ''){ + return this.onConnect(); + } + this.socket.onPacket(packet); return this; }; @@ -105,6 +109,17 @@ return this; }; + /** + * Called when transport connects + * + * @api private + */ + + Transport.prototype.onConnect = function () { + this.socket.onConnect(); + return this; + } + /** * Clears close timeout *