ftp stops all processes?

I’m using socket ftp (“ftp.get”) to download some files. It seems that as soon as the ftp starts, everything else freezes, including sprite animations!

I’ve tried running a timed function, too, and it is pause while the socket.ftp does its thing.

What is going on? [import]uid: 37366 topic_id: 32665 reply_id: 332665[/import]

@Mimetic,

It is probably because the call is a blocking call and since everything is on the same thread it will block everything. Have you tried messing around with the timeout values? perhaps no connection is even being established?

This is a tricky problem for big FTP transfers. One solution perhaps is to create a new co-routine and create a custom LN12 sink (http://lua-users.org/wiki/FiltersSourcesAndSinks) for the FTP that constantly passes control to and from it to the main thread? Never tried anything like that as all the FTP stuff we did in the past was short and quick and did not need a progress bar or anything.

Regards,
M.Y. Developers [import]uid: 55057 topic_id: 32665 reply_id: 129858[/import]

@Mimetic,

It is probably because the call is a blocking call and since everything is on the same thread it will block everything. Have you tried messing around with the timeout values? perhaps no connection is even being established?

This is a tricky problem for big FTP transfers. One solution perhaps is to create a new co-routine and create a custom LN12 sink (http://lua-users.org/wiki/FiltersSourcesAndSinks) for the FTP that constantly passes control to and from it to the main thread? Never tried anything like that as all the FTP stuff we did in the past was short and quick and did not need a progress bar or anything.

Regards,
M.Y. Developers [import]uid: 55057 topic_id: 32665 reply_id: 129858[/import]

The connection does work, and the issue is that the app freezes while downloading happens. Now that you’ve confirmed the call is a blocking call, I know it’s not me. Thank you!

I would rather not recode the FTP to work around this issue. Yikes. Instead, I’ll write it with HTTP async access. I think that will be easier than trying to get the FTP to behave the way I want. [import]uid: 37366 topic_id: 32665 reply_id: 129914[/import]

The connection does work, and the issue is that the app freezes while downloading happens. Now that you’ve confirmed the call is a blocking call, I know it’s not me. Thank you!

I would rather not recode the FTP to work around this issue. Yikes. Instead, I’ll write it with HTTP async access. I think that will be easier than trying to get the FTP to behave the way I want. [import]uid: 37366 topic_id: 32665 reply_id: 129914[/import]

It will be locking too, there are no threads in Corona, look into network.download()
http://developer.coronalabs.com/reference/index/networkdownload [import]uid: 52491 topic_id: 32665 reply_id: 129946[/import]

It will be locking too, there are no threads in Corona, look into network.download()
http://developer.coronalabs.com/reference/index/networkdownload [import]uid: 52491 topic_id: 32665 reply_id: 129946[/import]