telnet-rs icon indicating copy to clipboard operation
telnet-rs copied to clipboard

Any chance of addressing telnet server needs as part of this library?

Open TheGoddessInari opened this issue 5 years ago • 8 comments

Since it's named telnet and not telnet-client, is there any possibility of extending this to address the needs of telnet and telnet-like servers? I'd almost be interested in a Rust MUD if that was available.

TheGoddessInari avatar Apr 05 '19 20:04 TheGoddessInari

Hello @TheGoddessInari , I think that it is possible to extend this with any function related to telnet. But, I am not sure what a telnet server needs. Cloud you provide more specific examples or documents for this?

SLMT avatar Apr 06 '19 12:04 SLMT

I think since telnet is a symmetric protocol almost nothing need be done. Just use the Telnet::from_stream constructor, I think? I need this for a game jam I'm doing this weekend (multi-player telnet roguelike with a twist), so I'm going to give it a go. I'll let you know how it turns out.

BartMassey avatar Aug 03 '19 06:08 BartMassey

Yep, seems to work fine.

BartMassey avatar Aug 03 '19 07:08 BartMassey

Got my telnet server to make the telnet client send each character as typed with no echo. Exactly what I needed. No changes to telnet-rs.

BartMassey avatar Aug 03 '19 08:08 BartMassey

I've written a lot of telnet code now. Probably eight hours into it. I will file an issue and/or pull request with my findings. Still no changes strictly needed to telnet-rs, but some that might be nice to capture so that others don't have to figure stuff out.

BartMassey avatar Aug 03 '19 22:08 BartMassey

OK http://gitlab.com/BartMassey/one-way/src/net.rs has a bunch of telnet code in it. If somebody wants to look at it and make recommendations about what might be integrated here, that would be great. Otherwise I will try to figure it out later.

BartMassey avatar Aug 04 '19 12:08 BartMassey

I have a really gross cut now at a crate http://github.com/pdx-cs-rust/netdoor that has some server-side code layered over the top of this crate to allow the server to set up

  • "noecho"
  • "cbreak"
  • window size (but no dynamic resize yet)
  • terminal type (including/mainly ANSI)

There's no docs yet, or even a README, but there is an example app for what that's worth.

The API is currently pretty bad, so that will need work. I am wondering how much of this might want to be integrated with telnet-rs at some point?

BartMassey avatar Mar 09 '20 09:03 BartMassey

Thanks for your finding and suggestion! Currently, I have no plan to integrate new features into telnet-rs, but it is definitely nice to have those features. However, I am quite busy recently. I may not be able to look into these until the end of this month.

SLMT avatar Mar 09 '20 11:03 SLMT