Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Unable to render {include} The included page could not be found.
Unable to render {include} The included page could not be found.

FTPc_SendBuf()

Sends a file from a memory buffer.

Files

ftp-c.h/ftp-c.c

Prototype

CPU_BOOLEAN FTPc_SendBuf (CPU_CHAR *remote_file_name,

CPU_INT08U *file,

CPU_INT32U file_size,

CPU_BOOLEAN append,

NET_ERR *perr_net);

Arguments

remote_file_name File on the remote FTP server.

local_file Pointer to local buffer that will send file.

local_file_size Size of the memory buffer..

append Whether to append at the end of the existing file or overwrite content.

p_err_net Pointer to variable that will receive the return error code from this function.

Returned Values

DEF_OK, File successfully sent;

DEF_FAIL, otherwise.

Required Configuration

None.

Notes / Warnings

None.

Example Usage

#define BUF_SIZE 1024

 

CPU_INT08U buf[BUF_SIZE];

CPU_BOOLEAN result;

 

result = FTPc_SendBuf((CPU_CHAR *)"test",

(CPU_INT08U *)&buf[0],

(CPU_INT32U ) BUF_SIZE,

(CPU_BOOLEAN ) DEF_FALSE,

(NET_ERR *)&err);

if (result != DEF_OK) {

printf("FTPc_SendBuf() failed.\n\r");

}

  • No labels