MCPcopy Create free account
hub / github.com/CloudBoost/cloudboost / callback

Function callback

sdk/src/CloudSocketClientLib.js:1929–1943  ·  view source on GitHub ↗
(packet, index, total)

Source from the content-addressed store, hash-verified

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);

Callers 15

CloudObject.jsFile · 0.70
afterFunction · 0.70
proxyFunction · 0.70
encodeBase64ObjectFunction · 0.70
encodeArrayBufferFunction · 0.70
encodeBlobFunction · 0.70
_removeBlobsFunction · 0.70
writeEncodingFunction · 0.70
runInContextFunction · 0.70
getSessionFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected