Hello,
I've a strange error with B4i.
Same code runs well on B4A and B4J.
the following error is trigged after List command.
<B4IExceptionWrapper: Error Domain=caught_exception Code=0 "Error reading from stream: Error Domain=NSPOSIXErrorDomain Code=49 "Can't assign requested address" UserInfo={_kCFStreamErrorCodeKey=49, _kCFStreamErrorDomainKey=1}" UserInfo={NSLocalizedDescription=Error reading from stream: Error Domain=NSPOSIXErrorDomain Code=49 "Can't assign requested address" UserInfo={_kCFStreamErrorCodeKey=49, _kCFStreamErrorDomainKey=1}}>
what am I doing wrong ?
here the code:
I've a strange error with B4i.
Same code runs well on B4A and B4J.
the following error is trigged after List command.
<B4IExceptionWrapper: Error Domain=caught_exception Code=0 "Error reading from stream: Error Domain=NSPOSIXErrorDomain Code=49 "Can't assign requested address" UserInfo={_kCFStreamErrorCodeKey=49, _kCFStreamErrorDomainKey=1}" UserInfo={NSLocalizedDescription=Error reading from stream: Error Domain=NSPOSIXErrorDomain Code=49 "Can't assign requested address" UserInfo={_kCFStreamErrorCodeKey=49, _kCFStreamErrorDomainKey=1}}>
what am I doing wrong ?
here the code:
code:
Dim FTPC As FTP
Dim r As Int
PATH = "/files/"
FTPC.Initialize("FTPC", "192.168.1.250", "21", "user", "password")
FTPC.PassiveMode = True
FTPC.SendCommand("CWD", PATH)
Wait For FTPC_CommandCompleted (Command As String, Success As Boolean, ReplyCode As Int, ReplyString As String)
If Success = True Then
FTPC.List("")
Wait For FTPC_ListCompleted (ServerPath As String, Success As Boolean, Folders() As FTPEntry, Files() As FTPEntry)
If Success = True Then
For r = 0 To Files.Length - 1
Log(Files(r).Name)
'<sometyhing to do...>
'<...>
'<...>
Else
Log(LastException)
End If
Else
Log(LastException)
End If