ajaxorg/jsftp — pull request #4 by sergi (2012-11-15 22:35:32+00:00)
Title: Implement proper streaming capabilities for passive commands

This fix gives proper Nodejs streaming capabilities to FTP. Until now, jsftp relied on buffering, although it had streaming methods ready to be used (`getPutSocket` and `getGetSocket`). However, upon some testing with vfs-ftp I found out that piping wouldn't work, and it would never do because of the way that PASV commands were handled at the moment. That is, sequentially.

Passive command handling methods have been now split into two, _streamingPasv and orderedPasv. The latter uses the former, and now the user of the API can choose what API to use (the streaming API is less straightforward). In this way, getPutSocket and getGetSocket can directly use the methods that allow them to do multiple requests and deal with the returned sockets (streams). The implementation is cleaner now.

In case you were wondering why not get rid of the sequential API, it is because the sequential API is useful for when the user wants to ensure that an FTP command will always be executed after another. Check out the test "test multiple concurrent pasvs" as an example.

@ajaxorg/knuth @zefhemel