The sftp code was removed with paramiko, what we can do to restore the functionality is to define a new message type for file transfers and send the file through the normal client-server channel.
new accept_files option for servers (defaults to off?)
keep file pointer + index in server connection
send first chunk of data, below the max_line limit and also taking into account the link speed
server creates a temporary file in configurable download location (default to ~/Download)
server sends an ack after each packet is received (potential small delay here to ensure we prioritize other packets ahead of file transfers)
client fire progress_update callbacks registered with the file transfer
client sends the next chunk (potential delay here - same reason as above), taking into account how long the first previous took (so we can keep UI updates regular - say 1 second target)
if the server (or client) does not ack (or send the next chunk) within a certain amount of time (tbd - dynamic?), we cancel the whole thing and tell the other end. The server can delete the temporary file.
When the transfer is complete, we ask the server to open it.
Some commands barely use any features, yet they need to import tons of stuff. This makes them slow to start and produces lots of unnecessary debug messages to be printed.
Examples:
away/back: should not care about pygtk, icons, etc..
"--help" should not need to load pygst (which causes its own warning logging: ** Message: pygobject_register_sinkfunc is deprecated (GstObject))