iOS Question ftp.list error with B4i

Alex.Gi

Member
Licensed User
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:

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
 
Hard to say what causes it. Might be more information in the server logs.
this is the vsftpd.log on my server:

Tue Jun 11 07:05:42 2024 [pid2] CONNECT: Client "<my ip>"
Tue Jun 11 07:05:42 2024 [pid1] [<ftp user>] OK LOGIN: Client "<my ip>"

so server side it seems OK.

I'm going crazy ))))))))))))))))
 
Upvote 0
Back
Top