libunftp icon indicating copy to clipboard operation
libunftp copied to clipboard

start and stop by different methods

Open leo-je opened this issue 2 years ago • 1 comments

I want to encapsulate two methods, start() and stop(), to control the startup and shutdown of the FTP service, but it seems that I can only start it. How can I implement stop()?

leo-je avatar Jul 27 '23 09:07 leo-je

Hi @leo-je , to strop you can provide a Future to the shutdown_indicator method on Server. You future should then resolve when your stop method is called.

Here is an example in unFTP where we resolve this future when a message is received on a channel.

hannesdejager avatar Jul 27 '23 20:07 hannesdejager

@leo-je , hopefully you resolved it by now. I'm closing this.

hannesdejager avatar Aug 12 '24 01:08 hannesdejager