I am trying to get asyncftpclient to work (from windows) and I think I ran into 
a bug. Connecting works but commands do not (I guess the connection is not kept 
alive?).

Does the following code work for you?
    
    
    import asyncdispatch, asyncftpclient
    proc main() {.async.} =
        echo "trying to connect..."
        var ftp = new_async_ftp_client("speedtest.tele2.net", user = 
"anonymous", pass = "")
        await ftp.connect()
        echo "connected"
        var x = await ftp.send("pwd")
        echo x # output: 530 Please login with USER and PASS. <- not what we 
want
    
    waitFor(main())
    
    
    Run

Reply via email to