(packet, index, total)
| 4514 | var self = this; |
| 4515 | debug('polling got data %s', data); |
| 4516 | var callback = function(packet, index, total) { |
| 4517 | // if its the first message we consider the transport open |
| 4518 | if ('opening' == self.readyState) { |
| 4519 | self.onOpen(); |
| 4520 | } |
| 4521 | |
| 4522 | // if its a close packet, we close the ongoing requests |
| 4523 | if ('close' == packet.type) { |
| 4524 | self.onClose(); |
| 4525 | return false; |
| 4526 | } |
| 4527 | |
| 4528 | // otherwise bypass onData and handle the message |
| 4529 | self.onPacket(packet); |
| 4530 | }; |
| 4531 | |
| 4532 | // decode payload |
| 4533 | parser.decodePayload(data, this.socket.binaryType, callback); |
no outgoing calls
no test coverage detected