Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

return value when sending has newlines #13

Open
noririco opened this issue Jan 15, 2019 · 2 comments
Open

return value when sending has newlines #13

noririco opened this issue Jan 15, 2019 · 2 comments

Comments

@noririco
Copy link

const client = Telnet.client('192.168.56.1:4000');
let connected = false;
 
client.filter((event) => event instanceof Telnet.Event.Connected)
  .subscribe((event) => {
    connected = true;
    
    client.send('I am connected');
    client.sendln('also in sendln');
  });
 
client.data
  .subscribe((data) => {
    if (!connected) {
      return;
    }
    console.log((data));
  });
 
client.connect();

RESULT:

New client

Maxx command server.
Type Help to view a list of registered commands.

-->I

a
m

c
o
n
n
e
c
t
e
d
a
l
s
o

i
n

s
e
n
d
l
n



Command not recognised.  Enter 'help' to view a list of available commands.


[Press ENTER to execute the previous command again]
-->

@herrevilkitten
Copy link
Owner

@noririco thanks for the report.

From your report, it looks a newline is being sent in between each character with the send function (sendln just calls send and then send("\r\n")). Is this correct?

Is "Maxx Command Server" the telnet server you're connecting to?

I'll see if I can reproduce this using the servers I have access to.

@noririco
Copy link
Author

as you can see, only what was passed via send/sendln ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants