FTPServer.B4xlib also works with UI App. StarMessageLoop is not necessary as it is only for NON-UI Apps to dispose of the message queue. In UI apps we use resumable sub. In any case, Erel's example (here) works correctly even if the application is UI.