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

Function connectClient

test/common.js:226–239  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

224
225 process.nextTick(mustCall(() => {
226 function connectClient() {
227 if (clientCfg.sock) {
228 clientCfg.sock.connect(server.address().port, 'localhost');
229 } else {
230 clientCfg.host = 'localhost';
231 clientCfg.port = server.address().port;
232 }
233 try {
234 client.connect(clientCfg);
235 } catch (ex) {
236 ex.message = msg(ex.message);
237 throw ex;
238 }
239 }
240
241 if (server) {
242 server.listen(0, 'localhost', mustCall(() => {

Callers 1

setupFunction · 0.85

Calls 3

connectMethod · 0.80
addressMethod · 0.80
msgFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…