To assist the application in managing POLL requests,
the FTP client API automatically pauses before it reads from the pipe
to the client process. This wait suspends the interface and the application
and it protects the application from sending POLL requests at a rate
that degrades performance.
FCAI_PollWait is used as follows:
- The value 0 (the default setting) in FCAI_PollWait instructs a
POLL request to wait 1 second prior to reading the pipe from the client.
- A value greater than 0 enables a progressive wait timer and sets
the maximum number of seconds that will be used. The field accepts
a value in the range 0–255 seconds (4.25 minutes), but a value
of 32 seconds or less is recommended for most subcommands.
- The current timer value is stored internally in the interface
and persists between POLL requests that are issued for the same prior
subcommand. If a progressive timer has not been enabled, the current
timer value is always 1 second. A progressive wait timer begins at
1 second and doubles after each POLL until the maximum setting is
reached or exceeded. If exceeded, the timer value is set to the value
that was supplied by the user.
- The application can enable or disable the progressive timer and
increase or decrease the maximum value to use on any POLL, regardless
of the current timer value. The interface checks prior to each POLL
to ensure that the timer does not exceed the specified maximum (the
value 0 sets the maximum to 1 second).
- The current timer value resets to 1 second after a POLL receives
data from the pipe. This enables the user to retrieve all available
output efficiently and removes much of the application's burden of
managing a progressive timer. If a progressive timer has been requested,
it begins to progress again as no data is returned (unless all output
has been retrieved).
- The application is responsible for sending each POLL request.
POLL requests are not generated automatically by the interface. The
PollWait interval is in addition to any wait done in the application
program.