recvLineAsync for non-blocking sockets implemented, as well as recvLine for asyncio async sockets. Fixed removeDir on windows.
This commit is contained in:
parent
7ec9b042e4
commit
9aeecaa4cf
5 changed files with 83 additions and 10 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue