(packet, index, total)
| 1927 | var self = this; |
| 1928 | debug('polling got data %s', data); |
| 1929 | var callback = function(packet, index, total) { |
| 1930 | // if its the first message we consider the transport open |
| 1931 | if ('opening' == self.readyState) { |
| 1932 | self.onOpen(); |
| 1933 | } |
| 1934 | |
| 1935 | // if its a close packet, we close the ongoing requests |
| 1936 | if ('close' == packet.type) { |
| 1937 | self.onClose(); |
| 1938 | return false; |
| 1939 | } |
| 1940 | |
| 1941 | // otherwise bypass onData and handle the message |
| 1942 | self.onPacket(packet); |
| 1943 | }; |
| 1944 | |
| 1945 | // decode payload |
| 1946 | parser.decodePayload(data, this.socket.binaryType, callback); |
no outgoing calls
no test coverage detected