9swampy / Telnet

Published on Nuget at https://www.nuget.org/packages/Telnet
http://www.nugetmusthaves.com/Package/Telnet
MIT License
126 stars 50 forks source link

Async Connect support #50

Closed TheYarin closed 4 years ago

TheYarin commented 4 years ago

Hey there, I noticed there's already a branch implementing Connect() asynchronously. Is there any chance of releasing it any time soon?

9swampy commented 4 years ago

You're pushing the limits of my memory but the branch you note hadn't worked out; that's why it was left hanging. It would require a rethink and quite a bit of refactoring. See https://github.com/9swampy/Telnet/issues/5 and https://github.com/9swampy/Telnet/issues/11.

That said; there is published async functionality in the live package - just not in all framework implementations - have you tried?

TheYarin commented 4 years ago

The live package? Do you mean the partial Async implementaion the last version on nuget.org? It's great, I'll test it soon, but the Connect() blocking is kind of annoying when dealing with a lot of potentially unresponsive devices.

I managed to get around it by asynchronously testing for an open port using System.Net.Sockets.TcpClient, but that means I need to open a redundant TCP session.

9swampy commented 4 years ago

I appreciate it's not all singing all dancing but was fit for my purpose and then some. If it helps you - great. If you need to push it a bit farther i'm sure others would appreciate/support a PR too :)

TheYarin commented 4 years ago

I completely understand, thank you :)