File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -697,6 +697,11 @@ export class Client extends EventEmitter {
697697 * the server.
698698 */
699699 openssh_forwardOutStreamLocal ( socketPath : string , cb : ClientCallback ) : this;
700+
701+ /**
702+ * Calls setNoDelay() on the underlying socket. Disabling Nagle's algorithm improves latency at the expense of lower throughput.
703+ */
704+ setNoDelay ( noDelay ?: boolean ) : this;
700705}
701706
702707export type HostVerifier = ( key : Buffer , verify : VerifyCallback ) => void ;
Original file line number Diff line number Diff line change @@ -342,6 +342,10 @@ const sshconfig: ssh2.ConnectConfig = {
342342 } ,
343343} ;
344344
345+ // setNoDelay
346+ var Client = require ( "ssh2" ) . Client ;
347+ var conn = new Client ( ) . setNoDelay ( true ) ;
348+
345349//
346350// # Server Examples
347351//
You can’t perform that action at this time.
0 commit comments