filezilla engine connect question

Moderator: Project members

Post Reply
Message
Author
ricardo.c.liu
500 Command not understood
Posts: 2
Joined: 2016-12-29 03:57

filezilla engine connect question

#1 Post by ricardo.c.liu » 2016-12-29 06:37

I make a demo,and Execute CConnectCommand class to create a connection,but when i Execute CFileTransferCommand class to transfer file, it return FZ_REPLY_BUSY or FZ_REPLY_NOTCONNECTED.I find someone said "Every action will require it's own connection", but i don't konw how to do this.

User avatar
botg
Site Admin
Posts: 35547
Joined: 2004-02-23 20:49
First name: Tim
Last name: Kosse

Re: filezilla engine connect question

#2 Post by botg » 2016-12-29 10:26

FZ_REPLY_BUSY means that the engine is already executing a command, FZ_REPLY_NOTCONNECTED means that the engine is not connected yet the command requires a connected engine.

Looks like you are not waiting for commands to finish executing.

ricardo.c.liu
500 Command not understood
Posts: 2
Joined: 2016-12-29 03:57

Re: filezilla engine connect question

#3 Post by ricardo.c.liu » 2016-12-30 01:28

botg wrote:FZ_REPLY_BUSY means that the engine is already executing a command, FZ_REPLY_NOTCONNECTED means that the engine is not connected yet the command requires a connected engine.

Looks like you are not waiting for commands to finish executing.
thank you very much.i using

Code: Select all

while(engine.IsBusy());
to wait for connect commands finish,but when i excute next commands,it returns FZ_REPLY_NOTCONNECTED.how can i waiting for commands to finish and keep conntcting.thank you. :)

User avatar
botg
Site Admin
Posts: 35547
Joined: 2004-02-23 20:49
First name: Tim
Last name: Kosse

Re: filezilla engine connect question

#4 Post by botg » 2016-12-30 09:24

Don't do busy waiting, that design anti-pattern does not belong in modern code.

Wait for the notification callback, dispatch the notifications through wx' event system and then react to those notifications.

Post Reply