EldoS | Feel safer!

Software components for data protection, secure storage and transfer

SendCmd behavior with intermediate replies

Also by EldoS: MsgConnect
Cross-platform protocol-independent communication framework for building peer-to-peer and client-server applications and middleware components.
Posted: 01/15/2012 15:48:55
by Martin Plante (Basic support level)
Joined: 01/15/2012
Posts: 10

I'm trying to make FXP work (server to server transfer) using the SendCmd. I did succeed, but...

First, I'm sending one server a "PASV" command and capture its response via OnCommandReceiveAsString, then send the other a "PORT" to that captured address.

Second, I send one a "STOR" and the other a "RETR". The file does get transferred, but my app can't tell when transfer has completed, because SendCmd returns right away when it gets the initial 1## reply code. These codes are intermediate codes, and another reply in the 2##-5## range is expected. There should be a way to tell SendCmd to NOT return right away after a 1## reply.

I could check the OnControlReceive for that code, but it seems your library does not read responses when there is no pending command (which I believe is against the protocol, as spontaneous responses are possible, though I admit can cause headaches).

Is there a way to tell SendCmd to wait for completion replies? This tiny little thing is the only thing currently preventing us from buying your product. :(
Posted: 01/16/2012 02:45:57
by Eugene Mayevski (EldoS Corp.)

Unfortunately no, SendCmd can't be used that way. SendCmd literally sends a command and receives a response. Handling data channel is more than waiting for reply from the server - at the same time command channel must be listened, and the order in which command and data channel states are updated after the transfer, differ between servers, which brings additional complexity.

FXP should be implemented inside of the component. And the task to design the functionality right is not trivial.

Sincerely yours
Eugene Mayevski
Posted: 01/16/2012 06:50:11
by Martin Plante (Basic support level)
Joined: 01/15/2012
Posts: 10

Thank you for your answer.

I'm pretty comfortable with the FTP protocol, and I've made FXP work with your library within the range of what we need to do with it. I really think having a SendCmd method that does not wait for a completion reply is a flaw, even though that method is a hack for special requests to begin with. Wouldn't it be nice to have a SendCmd overload that takes two arrays of shorts, the accepted intermediate codes (that don't make the method return nor throw) and the accepted completion codes?

I'd hate to choose that other library from the company who's name starts with a line feed. :(
Posted: 01/16/2012 07:05:12
by Eugene Mayevski (EldoS Corp.)

Answered in HelpDesk.

Sincerely yours
Eugene Mayevski



Topic viewed 627 times

Number of guests: 1, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!