telnet-client
- Version 2.2.2
- Published
- 64.5 kB
- 2 dependencies
- MIT license
Install
npm i telnet-client
yarn add telnet-client
pnpm add telnet-client
Overview
A simple node.js telnet client
Index
Classes
class Telnet
class Telnet extends EventEmitter {}
constructor
constructor();
method connect
connect: (opts: any) => Promise<void>;
method destroy
destroy: () => Promise<void>;
method end
end: () => Promise<void>;
method exec
exec: ( cmd: string, opts?: ExecOptions | Callback<string>, callback?: Callback<string>) => Promise<string>;
method getSocket
getSocket: () => Socket | null;
method negotiate
negotiate: (chunk: Buffer) => Buffer;
method nextData
nextData: () => Promise<string | null>;
method parseData
parseData: (chunk: Buffer, isReady?: boolean[]) => Buffer;
method send
send: ( data: Buffer | string, opts?: SendOptions | Callback<string>, callback?: Callback<string>) => Promise<string>;
method shell
shell: (callback?: Callback<Stream>) => Promise<Stream>;
method write
write: ( data: Buffer | string, opts?: SendOptions, callback?: Callback<string>) => Promise<string>;
Interfaces
interface ConnectOptions
interface ConnectOptions extends SendOptions {}
property debug
debug?: boolean;
property disableLogon
disableLogon?: boolean;
property echoLines
echoLines?: number;
property encoding
encoding?: BufferEncoding;
property escapeHandler
escapeHandler?: EscapeHandler;
property execTimeout
execTimeout?: number;
property extSock
extSock?: any;
property failedLoginMatch
failedLoginMatch?: string | RegExp;
property host
host?: string;
property initialCtrlC
initialCtrlC?: boolean;
property initialCTRLC
initialCTRLC?: boolean;
Deprecated
property initialLFCR
initialLFCR?: boolean;
property irs
irs?: string;
property localAddress
localAddress?: string;
property loginPrompt
loginPrompt?: string | RegExp;
property maxEndWait
maxEndWait?: number;
property negotiationMandatory
negotiationMandatory?: boolean;
property pageSeparator
pageSeparator?: string | RegExp;
property password
password?: string;
property passwordPrompt
passwordPrompt?: string | RegExp;
property port
port?: number;
property sock
sock?: Socket;
property socketConnectOptions
socketConnectOptions?: SocketConnectOpts;
property stripShellPrompt
stripShellPrompt?: boolean;
property terminalHeight
terminalHeight?: number;
property terminalWidth
terminalWidth?: number;
property username
username?: string;
interface ExecOptions
interface ExecOptions {}
property echoLines
echoLines?: number;
property execTimeout
execTimeout?: number;
property failedLoginMatch
failedLoginMatch?: string | RegExp;
property irs
irs?: string;
property loginPrompt
loginPrompt?: string | RegExp;
property maxBufferLength
maxBufferLength?: number;
property newlineReplace
newlineReplace?: string;
property ors
ors?: string;
property shellPrompt
shellPrompt?: string | RegExp;
property stripControls
stripControls?: boolean;
property timeout
timeout?: number;
interface SendOptions
interface SendOptions {}
property maxBufferLength
maxBufferLength?: number;
property newlineReplace
newlineReplace?: string;
property ors
ors?: string;
property sendTimeout
sendTimeout?: number;
property shellPrompt
shellPrompt?: string | RegExp;
property stripControls
stripControls?: boolean;
property timeout
timeout?: number;
property waitfor
waitfor?: string | RegExp | false;
Deprecated
property waitFor
waitFor?: string | RegExp | false;
Type Aliases
type EscapeHandler
type EscapeHandler = (escapeSequence: string) => string | null;
type TelnetState
type TelnetState = | null | 'end' | 'failedlogin' | 'getprompt' | 'login' | 'ready' | 'response' | 'standby' | 'start';
Package Files (1)
Dependencies (2)
Dev Dependencies (20)
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/telnet-client
.
- Markdown[![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/telnet-client)
- HTML<a href="https://www.jsdocs.io/package/telnet-client"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 3257 ms. - Missing or incorrect documentation? Open an issue for this package.