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

Method channelClose

lib/protocol/Protocol.js:432–444  ·  view source on GitHub ↗
(chan)

Source from the content-addressed store, hash-verified

430 sendPacket(this, this._packetRW.write.finalize(packet));
431 }
432 channelClose(chan) {
433 // Does not consume window space
434
435 let p = this._packetRW.write.allocStart;
436 const packet = this._packetRW.write.alloc(1 + 4);
437
438 packet[p] = MESSAGE.CHANNEL_CLOSE;
439
440 writeUInt32BE(packet, chan, ++p);
441
442 this._debug && this._debug(`Outbound: Sending CHANNEL_CLOSE (r:${chan})`);
443 sendPacket(this, this._packetRW.write.finalize(packet));
444 }
445 channelWindowAdjust(chan, amount) {
446 // Does not consume window space
447

Callers 3

closeMethod · 0.80
destroyMethod · 0.80
test-sftp.jsFile · 0.80

Calls 3

writeUInt32BEFunction · 0.85
allocMethod · 0.45
finalizeMethod · 0.45

Tested by

no test coverage detected