Allow passthrough

This commit is contained in:
Bryan Ashby 2020-05-20 20:23:09 -06:00
parent e85ba322ce
commit 65d68f33dc
No known key found for this signature in database
GPG Key ID: B49EB437951D2542
1 changed files with 11 additions and 1 deletions

View File

@ -24,8 +24,8 @@ class TelnetClient {
constructor(socket) {
Client.apply(this, socket, socket);
this.setInputOutput(socket, socket);
this.socket = new TelnetSocket(socket);
this.setInputOutput(this.socket, this.socket);
//
// Wait up to 3s to hear about from our terminal type request
@ -50,6 +50,8 @@ class TelnetClient {
this.emit('end');
});
// :TODO: handle 'command error' event
this.socket.on('DO', command => {
switch (command.option) {
case Options.ECHO :
@ -178,6 +180,14 @@ class TelnetClient {
});
}
get dataPassthrough() {
return this.socket.passthrough;
}
set dataPassthrough(passthrough) {
this.socket.passthrough = passthrough;
}
disconnect() {
try {
return this.socket.rawSocket.end();