.TH "globus_gass_transfer_data" 3 "Tue Jul 5 2022" "Version 9.4" "globus_gass_transfer" \" -*- nroff -*- .ad l .nh .SH NAME globus_gass_transfer_data \- Sending and Receiving Data .PP \- Sending and Receiving Data\&. .SH SYNOPSIS .br .PP .SS "Typedefs" .in +1c .ti -1c .RI "typedef void(* \fBglobus_gass_transfer_bytes_callback_t\fP) (void *arg, \fBglobus_gass_transfer_request_t\fP request, globus_byte_t *bytes, globus_size_t length, globus_bool_t last_data)" .br .in -1c .SS "Functions" .in +1c .ti -1c .RI "int \fBglobus_gass_transfer_send_bytes\fP (\fBglobus_gass_transfer_request_t\fP request, globus_byte_t *bytes, globus_size_t send_length, globus_bool_t last_data, \fBglobus_gass_transfer_bytes_callback_t\fP callback, void *user_arg)" .br .ti -1c .RI "int \fBglobus_gass_transfer_receive_bytes\fP (\fBglobus_gass_transfer_request_t\fP request, globus_byte_t *bytes, globus_size_t max_length, globus_size_t wait_for_length, \fBglobus_gass_transfer_bytes_callback_t\fP callback, void *user_arg)" .br .in -1c .SH "Detailed Description" .PP Sending and Receiving Data\&. .SH "Typedef Documentation" .PP .SS "typedef void(* globus_gass_transfer_bytes_callback_t) (void *arg, \fBglobus_gass_transfer_request_t\fP request, globus_byte_t *bytes, globus_size_t length, globus_bool_t last_data)" Byte send or receive callback function\&. .PP \fBParameters\fP .RS 4 \fIarg\fP The user_arg passed to the function which registered this callback\&. The user may use this value for any purpose\&. .br \fIrequest\fP The request handle associated with this byte array\&. .br \fIbytes\fP The byte array which was sent or received\&. .br \fIlength\fP The length of data which was sent or received\&. .br \fIlast_data\fP Boolean flag whether this is the final byte array for this request\&. .RE .PP \fBSee also\fP .RS 4 \fBglobus_gass_transfer_send_bytes()\fP, \fBglobus_gass_transfer_receive_bytes()\fP .RE .PP .SH "Function Documentation" .PP .SS "int globus_gass_transfer_receive_bytes (\fBglobus_gass_transfer_request_t\fP request, globus_byte_t * bytes, globus_size_t max_length, globus_size_t wait_for_length, \fBglobus_gass_transfer_bytes_callback_t\fP callback, void * user_arg)" Receive a byte array associated with a request handle\&. .PP This function receives a block of data from a server or client as part of the processing for a request\&. Multiple data blocks may be registered with the GASS transfer library at once\&. .PP When processing a server request, this function may only be used in conjunction with 'put' or 'append' requests\&. The user must call \fBglobus_gass_transfer_authorize()\fP before calling this function\&. .PP When processing a client request, this function may only be used in conjunction with 'get' requests\&. This function may not be called before either the callback function has been invoked, or the blocking globus_gass_tranfser_put() or \fBglobus_gass_transfer_append()\fP function has returned\&. .PP \fBParameters\fP .RS 4 \fIrequest\fP The request handle with which this block of bytes is associated\&. .br \fIbytes\fP A user-supplied buffer containing the data associated with the request\&. .br \fImax_length\fP The length of the \fIbytes\fP array\&. .br \fIwait_for_length\fP The minimum amount of data to wait for before invoking the \fIcallback\fP function\&. A partial byte array of at least this amount will be returned in the callback, unless end-of-file is reached before this amount\&. .br \fIcallback\fP Function to call once the \fIbytes\fP array has been received\&. .br \fIuser_arg\fP Argument to be passed to the \fIcallback\fP function\&. .RE .PP \fBReturn values\fP .RS 4 \fIGLOBUS_SUCCESS\fP The \fIbytes\fP array was successfully registered with the GASS transfer library\&. The \fIcallback\fP function will be invoked once it has been received\&. .br \fIGLOBUS_GASS_TRANSFER_ERROR_NULL_POINTER\fP The \fIbytes\fP or \fIcallback\fP parameter was NULL\&. .br \fIGLOBUS_GASS_TRANSFER_ERROR_INVALID_USER\fP The \fIrequest\fP was invalid, or it is not one on which bytes can be sent\&. .br \fIGLOBUS_GASS_TRANSFER_ERROR_NOT_INITIALIZED\fP The callback to a non-blocking file request has not been invoked yet, a blocking file request has not returned, or the request has not yet been authorized\&. .br \fIGLOBUS_GASS_TRANSFER_ERROR_REQUEST_FAILED\fP The \fIrequest\fP has failed by either the client, server, or protocol module implementation\&. .br \fIGLOBUS_GASS_TRANSFER_ERROR_DONE\fP The \fIrequest\fP has already been completed\&. .RE .PP .SS "int globus_gass_transfer_send_bytes (\fBglobus_gass_transfer_request_t\fP request, globus_byte_t * bytes, globus_size_t send_length, globus_bool_t last_data, \fBglobus_gass_transfer_bytes_callback_t\fP callback, void * user_arg)" Send a byte array associated with a request handle\&. .PP This function sends a block of data to a server or client as part of the processing for a request\&. Multiple data blocks may be registered with the GASS transfer library at once\&. .PP When processing a server request, this function may only be used in conjunction with 'get' requests\&. The user must call \fBglobus_gass_transfer_authorize()\fP before calling this function\&. .PP When processing a client request, this function may only be used in conjunction with 'put' or 'append' requests\&. This function may not be called before either the callback function has been invoked, or the blocking globus_gass_tranfser_put() or \fBglobus_gass_transfer_append()\fP function has returned\&. .PP \fBParameters\fP .RS 4 \fIrequest\fP The request handle with which this block of bytes is associated\&. .br \fIbytes\fP A user-supplied buffer containing the data associated with the request\&. .br \fIsend_length\fP The length of the \fIbytes\fP array\&. .br \fIlast_data\fP A flag to indicate whether this is the final block of data for the request\&. If this is true, then the \fIcallback\fP function will be delayed until the server acknowledges that the file has been completely received\&. .br \fIcallback\fP Function to call once the \fIbytes\fP array has been sent\&. .br \fIuser_arg\fP Argument to be passed to the \fIcallback\fP function\&. .RE .PP \fBReturn values\fP .RS 4 \fIGLOBUS_SUCCESS\fP The \fIbytes\fP array was successfully registered with the GASS transfer library\&. The \fIcallback\fP function will be invoked once it has been sent\&. .br \fIGLOBUS_GASS_TRANSFER_ERROR_NULL_POINTER\fP The \fIbytes\fP or \fIcallback\fP parameter was NULL\&. .br \fIGLOBUS_GASS_TRANSFER_ERROR_INVALID_USER\fP The \fIrequest\fP was invalid, or it is not one on which bytes can be sent\&. .br \fIGLOBUS_GASS_TRANSFER_ERROR_NOT_INITIALIZED\fP The callback to a non-blocking file request has not been invoked yet, a blocking file request has not returned, or the request has not yet been authorized\&. .br \fIGLOBUS_GASS_TRANSFER_ERROR_REQUEST_FAILED\fP The \fIrequest\fP has failed by either the client, server, or protocol module implementation\&. .br \fIGLOBUS_GASS_TRANSFER_ERROR_DONE\fP The \fIrequest\fP has already been completed\&. .RE .PP .SH "Author" .PP Generated automatically by Doxygen for globus_gass_transfer from the source code\&.