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

filter and send the output to telnet clients line by line #127

Open
3 tasks
marado opened this issue Aug 31, 2021 · 2 comments
Open
3 tasks

filter and send the output to telnet clients line by line #127

marado opened this issue Aug 31, 2021 · 2 comments
Milestone

Comments

@marado
Copy link
Owner

marado commented Aug 31, 2021

There are several identified places where the Talker outputs raw information to their clients:

  • motd
  • .map
  • .file

A filter must be created, catching these streams and turning them into a line-by-line output to send to the client, letting the client be the one handling with termination lines and whatnot. This will solve the output of these commands to Windows' telnet client.

This was first identified in #121 (comment) .

@marado marado added this to the 0.7.0 milestone Aug 31, 2021
@meerhamzadev
Copy link

Hey @marado 👋, I'm interested in this issue. Can you explain it a bit more for a better understanding?

@marado
Copy link
Owner Author

marado commented Oct 1, 2021

Sure. In some parts (at least the three identified in the description), TalkerNode reads something that might have multiple lines (from a file, for example), and sends it to a client's socket. The problem with this approach is that "new lines" aren't parsed, and different clients will end up showing different things (notably, with differences between DOS and Unix systems: https://www.cs.toronto.edu/~krueger/csc209h/tut/line-endings.html). To solve this, a new parser can be created, and in those three places, instead of sending the multiline data to the socket, we can call that new function with the data and socket as a parameter, and the function will read the data and send it to the socket line by line).

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

No branches or pull requests

2 participants