MCPcopy
hub / github.com/nirui/sshwifty / run

Method run

ui/commands/ssh.js:96–114  ·  view source on GitHub ↗

* Send intial request * * @param {stream.InitialSender} initialSender Initial stream request sender *

(initialSender)

Source from the content-addressed store, hash-verified

94 *
95 */
96 run(initialSender) {
97 let user = new strings.String(this.config.user),
98 userBuf = user.buffer(),
99 addr = new address.Address(
100 this.config.host.type,
101 this.config.host.address,
102 this.config.host.port
103 ),
104 addrBuf = addr.buffer(),
105 authMethod = new Uint8Array([this.config.auth]);
106
107 let data = new Uint8Array(userBuf.length + addrBuf.length + 1);
108
109 data.set(userBuf, 0);
110 data.set(addrBuf, userBuf.length);
111 data.set(authMethod, userBuf.length + addrBuf.length);
112
113 initialSender.send(data);
114 }
115
116 /**
117 * Receive the initial stream request

Callers

nothing calls this directly

Calls 4

bufferMethod · 0.95
bufferMethod · 0.95
setMethod · 0.45
sendMethod · 0.45

Tested by

no test coverage detected