recvLineAsync for non-blocking sockets implemented, as well as recvLine for asyncio async sockets. Fixed removeDir on windows.

This commit is contained in:
dom96 2012-02-18 00:34:44 +00:00
commit 9aeecaa4cf
5 changed files with 83 additions and 10 deletions

View file

@ -196,9 +196,9 @@ proc getLines(ftp: var TFTPClient, async: bool = false): bool =
## It doesn't if `async` is true, because it doesn't check for 226 then.
if ftp.dsockStatus == SockConnected:
var r = TaintedString""
if ftp.dsock.recvLine(r):
if ftp.dsock.recvAsync(r):
if r.string != "":
ftp.job.lines.add(r.string & "\n")
ftp.job.lines.add(r.string)
else:
ftp.dsockStatus = SockClosed