MCPcopy Create free account
hub / github.com/PrairieLearn/PrairieLearn / callback

Function callback

public/javascripts/socket.io.js:5249–5263  ·  view source on GitHub ↗
(packet, index, total)

Source from the content-addressed store, hash-verified

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

Callers 15

server.jsFile · 0.85
socket.io.jsFile · 0.85
writeEncodingFunction · 0.85
runInContextFunction · 0.85
_removeBlobsFunction · 0.85
encodeBase64ObjectFunction · 0.85
encodeArrayBufferFunction · 0.85
encodeBlobFunction · 0.85
afterFunction · 0.85
proxyFunction · 0.85
async.jsFile · 0.85
doneFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected