-
Notifications
You must be signed in to change notification settings - Fork 55
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
Active mode support #16
Comments
At first look I think it is better to pass "passive" argument directly to download/upload/stream methods, not as init parameter, so we can change it from request to request. And there should be three functions: get_data_connection, get_passive_connection and get_active_connection. It will be more clean and get_data_connection will not be a monster 😄. Also get_active_connection (so do client) should handle one server and one data connection all the time (closing incomming if already connected), like server do. Server decorators should be modified of course. |
I'm not really sure that there're use cases when you need to use both modes in the same session. If you really do you can just change client to passive/active mode before the next command call. Regarding closing server and connections in client - i know, as i said it's still quick/dirty and it's just a miracle that it works and passes current tests ;) |
I will think about it. Maybe there is third solution. |
"passiveserver" in |
@rsichny look at #17 |
@pohmelie please take a look at https://github.com/pohmelie/aioftp/compare/master...Alliera:active-mode?expand=1 - i know it's dirty and needs tests so didn't create a PR yet. Also maybe you have better ideas about implementation?
The text was updated successfully, but these errors were encountered: