 |
» |
|
|
 |
Use ft_edata() and ft_etransfer() to terminate data transfers
in an orderly manner. Use ft_cancel() to prematurely terminate a
data transfer after issuing an ft_read() or ft_write() request,
and use ft_rcancel() to respond to a cancel indication. ft_edata() |  |
#include %</opt/ftam/include/map.h> #include %</opt/ftam/include/mapftam.h> Return_code ft_edata (connection_id, return_event_name, input_dcb, inout_dcb) Connection_id connection_id; Local_event_name return_event_name; char *input_dcb; struct Ft_edata_out_dcb **inout_dcb; |
After issuing the necessary number of ft_sdata() functions,
call ft_edata() to signal the responder you are no longer sending
data (i.e., you completed sending the data unit). You must call ft_edata() before calling ft_etransfer(); after
calling ft_edata(), you can no longer call ft_sdata() until you
call ft_etransfer() followed by ft_write(). Invoke ft_edata() in the Data Transfer
regime; you do not move to another regime.
struct Ft_edata_in_dcb { enum Ft_action_result action_result; struct Ft_diagnostic *diagnostic; }; |
struct Ft_edata_out_dcb { Uint32 size; struct Api_rc result; enum Ft_action_result action_result; struct Ft_diagnostic *diagnostic; }; |
ft_etransfer() |  |
#include %</opt/ftam/include/map.h> #include %</opt/ftam/include/mapftam.h> Return_code ft_etransfer (connection_id, return_event_name, input_dcb, inout_dcb) Connection_id connection_id; Local_event_name return_event_name; char *input_dcb; struct Ft_etransfer_out_dcb **inout_dcb; |
Use ft_etransfer() to end the transferring of data (ft_read()
or ft_write()). Use ft_etransfer() in one of the following sequences. Invoking ft_etransfer() in the Data
Transfer regime moves you back to the File Open regime. The ft_etransfer() input_dcb parameter does not
contain information; therefore, pass a NULL pointer for the input_dcb
parameter.
struct Ft_etransfer_out_dcb { Uint32 size; struct Api_rc result; enum Ft_action_result action_result; struct Ft_diagnostic *diagnostic; }; |
ft_etransfer() Parametersft_cancel() |  |
#include %</opt/ftam/include/map.h> #include %</opt/ftam/include/mapftam.h> Return_code ft_cancel (connection_id, return_event_name, input_dcb, inout_dcb) Connection_id connection_id; Local_event_name return_event_name; struct Ft_cancel_in_dcb *input_dcb; struct Ft_cancel_out_dcb **inout_dcb; |
Use ft_cancel() to prematurely terminate the transferring
of data. Using ft_cancel() does not abort the entire connection
(as does ft_abort()). An example of using ft_cancel() could be when
you are reading data from one FTAM file and writing to another,
and you encounter an error when writing the data. You may want to
cancel reading data from the FTAM file. Call ft_cancel() after ft_read() or ft_write(), rather than
calling ft_etransfer(). If you are reading a file, you will
not lose data. If you are writing to a file, you may or may not
lose the data you wrote. Invoking ft_cancel() in the Data Transfer regime
moves you back to the File Open regime.
struct Ft_cancel_in_dcb { enum Ft_action_result action_result; struct Ft_diagnostic *diagnostic; }; |
struct Ft_cancel_out_dcb { Uint32 size; struct Api_rc result; enum Ft_action_result action_result; struct Ft_diagnostic *diagnostic; }; |
ft_rcancel() |  |
#include %</opt/ftam/include/map.h> #include %</opt/ftam/include/mapftam.h> Return_code ft_rcancel (connection_id, return_event_name, input_dcb, inout_dcb) Connection_id connection_id; Local_event_name return_event_name; struct Ft_rcancel_in_dcb *input_dcb; struct Ft_rcancel_out_dcb **inout_dcb; |
If an error occurs during a data transfer, the responder sends
you a cancel indication. To acknowledge you received this
indication, call ft_rcancel(). A cancel indication returns either
as an inout_dcb->result.return_code of FTE175_FCANCEL_IN_RECEIVED
on ft_sdata() or as an inout_dcb->data_unit.structure_id of FT_CANCEL_IND
on ft_rdata().
If you do not send ft_rcancel(), you receive a protocol error
which results in an abort. Invoking ft_rcancel() in the Data
Transfer regime moves you back to the File Open regime.
struct Ft_rcancel_in_dcb { enum Ft_action_result action_result; struct Ft_diagnostic *diagnostic; }; |
struct Ft_rcancel_out_dcb { Uint32 size; struct Api_rc result; }; |
|