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