/** * This module handles the initial handshake (i.e. authentication * and session allocation) on the remote console port. After the * handshake completes, `telnet` and `video` would be used. */ /** */ /// import { Duplex } from 'stream'; import { RemoteConsoleInfo } from '../rest'; export declare enum ServerStatus { HELLO = 80, ACCESS_DENIED = 81, OK = 82, BUSY_1 = 83, NO_LICENSE = 87, NO_FREE_SESSIONS = 88, BUSY_2 = 89 } /** * Negotiates a console / command connection. * * Returns if correct (afterwards you can start the `telnet` * receiver) or throws error. * * If the server returns busy, the `negotiateBusy` option will be * called. It must return a promise resolving to either `'seize'`, * `'share'`, or anything else (throws error). * * Warning: I'm not sure iLO actually validates the key anymore, * it returns OK even when the encKey is wrong, then of course * decryption yields gibberish and the decoder fails. * * @param cmd `true` if negotiating a command connection, `false` if negotiating a remote console connection. * @param socket recently-opened socket (or duplex stream) * @param sessionKey * @param rcinfo */ export declare function negotiateConnection(cmd: boolean, socket: Duplex, sessionKey: Uint8Array, rcinfo: RemoteConsoleInfo, options?: { negotiateBusy?: () => PromiseLike<'share' | 'seize'>; }): Promise; export default negotiateConnection;