1

For the sake of learning I'm writing some codes in C# to create an FTP client without GUI. For the connection I'm using the "FluentFTP" module from below link: https://github.com/robinrodricks/FluentFTP#connection I'm wondering how to detect idle user and disconnect them from the server. Should I use Async or Parallel programming? I'm knew to both of them, please refer me to some simple tutorial if that is the solution.

I can provide codes, but won't for now to keep it clean. My app tries to read IP, username, and password of the FTP server and connects to it, then does some regular stuff like upload and download files. Timeout can happen during data entry or at the page user decides what task wants to do, but shouldn't happen when files are being transmitted!

Damon
  • 69
  • 6
  • So your question is not about any connection nor FTP, it's about detecting an idle user input, isn't it? – Martin Prikryl Jul 24 '19 at 06:10
  • Yes, mainly detecting idle user, however the idle user in my case is not someone that doesn't touch the keyboard, because they can be uploading huge files. I mentioned connection because I want to disconnect when idle is detected. – Damon Jul 24 '19 at 17:33
  • If you ask *"How to detect idle input in C# console application"* you will for sure get a way more attention than with the current vague wording. – Martin Prikryl Jul 26 '19 at 17:44
  • Would this help? [How to add a Timeout to Console.ReadLine()?](https://stackoverflow.com/q/57615/850848) – Martin Prikryl Jul 30 '19 at 08:41

0 Answers0