Wow, your boss is a tough customer. FTP protocol can get complicated, especially in dealing with passive connections and parsing directory listings, not to mention the additional things you need to do if you want to support FTPS (FTP over SSL). If you can, I would try and convince your boss to go with an existing API that has solved these problems.
you might look at the following.
http://www.jscape.com/sftp/