(packet, index, total)
| 5247 | var self = this; |
| 5248 | debug('polling got data %s', data); |
| 5249 | var callback = function (packet, index, total) { |
| 5250 | // if its the first message we consider the transport open |
| 5251 | if ('opening' === self.readyState) { |
| 5252 | self.onOpen(); |
| 5253 | } |
| 5254 | |
| 5255 | // if its a close packet, we close the ongoing requests |
| 5256 | if ('close' === packet.type) { |
| 5257 | self.onClose(); |
| 5258 | return false; |
| 5259 | } |
| 5260 | |
| 5261 | // otherwise bypass onData and handle the message |
| 5262 | self.onPacket(packet); |
| 5263 | }; |
| 5264 | |
| 5265 | // decode payload |
| 5266 | parser.decodePayload(data, this.socket.binaryType, callback); |
no outgoing calls
no test coverage detected