MCPcopy Create free account
hub / github.com/mscdex/ssh2 / alloc

Method alloc

lib/protocol/zlib.js:216–220  ·  view source on GitHub ↗
(payloadSize, force)

Source from the content-addressed store, hash-verified

214 cleanup() {}
215
216 alloc(payloadSize, force) {
217 if (this._protocol._kexinit === undefined || force)
218 return this._protocol._cipher.allocPacket(payloadSize);
219 return Buffer.allocUnsafe(payloadSize);
220 }
221
222 finalize(packet, force) {
223 return packet;

Callers 15

convertKeysFunction · 0.45
agent.jsFile · 0.45
getStreamMethod · 0.45
kex.jsFile · 0.45
kexinitFunction · 0.45
finishMethod · 0.45
startMethod · 0.45
startMethod · 0.45
parseMethod · 0.45
startMethod · 0.45
trySendNEWKEYSFunction · 0.45
crypto.jsFile · 0.45

Calls 1

allocPacketMethod · 0.45

Tested by

no test coverage detected