MCPcopy Create free account
hub / github.com/node-apn/node-apn / establishEndpoint

Function establishEndpoint

test/protocol/endpointManager.js:499–514  ·  view source on GitHub ↗
(manager, skipConnect)

Source from the content-addressed store, hash-verified

497 });
498
499 function establishEndpoint(manager, skipConnect) {
500 let callCount = fakes.Endpoint.callCount;
501 manager.getStream();
502
503 if(fakes.Endpoint.callCount !== callCount + 1) {
504 return null;
505 }
506
507 let endpoint = fakes.Endpoint.lastCall.returnValue;
508 endpoint.availableStreamSlots = 0;
509
510 if (!skipConnect) {
511 endpoint.emit("connect");
512 }
513 return endpoint;
514 }
515});

Callers 1

endpointManager.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…