aftp_set_record_length

The aftp_set_record_length call sets the record length for fixed length records, or the maximum possible record length for variable length records used for data transfer. A connection to the AFTP server is not required before using this call. The record length can be changed at any time.

AFTP_ENTRY aftp_set_record_length(
IN AFTP_HANDLE_TYPE
connection_id,
IN AFTP_RECORD_LENGTH_TYPE
record_length,
OUT AFTP_RETURN_CODE_TYPE AFTP_PTR
return_code
);

Parameters

connection_id
An AFTP connection object originally created with aftp_create.
record_length
The record length for the data transfer specified in bytes. The default value is zero.
return_code
The return code issued for this function. See AFTP Return Codes for the list of possible return codes.

Example

{
    AFTP_HANDLE_TYPE       connection_id;
    AFTP_RETURN_CODE_TYPE  aftp_rc;

    /*
     * Before issuing the example call, you must have:
     *    a connection_id, use:  aftp_create()
     */

    /*
     * Set the record length for the file transfer.
     */

    aftp_set_record_length(
        connection_id,
        64,
        &aftp_rc);

    if (aftp_rc != AFTP_RC_OK) {
        fprintf(stderr, "Error setting AFTP record length.\n");
    }

}
 

Line Flows

None.