Home > Back-end >  C builder IdFtp components how to determine the correct connection mode
C builder IdFtp components how to determine the correct connection mode

Time:10-24

Development environment: c + + builder6.0 IdFtp9 components, FTP Server Server -u,
Problem description:
Found a phase: the client Ftp connection is not on, check data, will IdFtp PASSIVE attribute set to True (PASSIVE mode) made corresponding configuration for the server at the same time, problem solving,
Stage 2: find there are still individual client connection, and abnormal pop-up Socket 10060, namely the timeout, at this time will be PASSIVE attribute set to False (active mode), discovered actually normal,
Q: a passive mode is not everything, how can appear only support active mode?
Second, how to determine the current network for which model (that can dynamically set properties PASV)?

CodePudding user response:

You can at the time of failure, change to another mode

CodePudding user response:

Fail, wrong window has to play out, how to capture and avoid error pop up?

CodePudding user response:

You can try calling function, and then after the catch an exception

For example,

Try
{
//your function
}
The catch (... )
{throw Exception (" ");
//to add your own code, or according to your design ideas ignored here, what all don't produce
}

Can achieve abnormal not selling out,
  • Related