Datasheet

Flyport Wi-Fi and Ethernet Programmer's guide framework 2.3 (rev 1.0) www.openpicus.com
FTP Low level functions
Low level functions allow the user to manage basic FTP functionalities, as creating a socket, or
reading/writing chars on FTP command or data socket. Using this set of command, the user can build
its own functions to access FTP services, but has to manage the timeouts and parse the answers from
the server. In general, the "FTP high level functions" offer an easier and more flexible solution to
manage almost every FTP client functionalities.
Create an FTP client socket FTPClientOpen(char ftpaddr[],
char ftpport[]);
Creates an FTP client on the specified IP address and port.
Parameters:
ftpaddr: IP address or name of the remote server. Example: "192.168.1.100" (the char array must be
NULL terminated).
ftpport: Port of the remote server to connect. Example: "1234" (the char array must be NULL
terminated).
Returns:
TCP_SOCKET: of the created socket. It must be used to access the socket in the program (read/write
operations and close socket).
INVALID_SOCKET: the operation was failed. Maybe there are not available sockets.
Open PASSIVE MODE FTPClientPasv(TCP_SOCKET sockpasv[],
char ServerName[]);
Open a PassiveMode data exchange between Flyport (Client) and the Server .
Parameters:
sockpasv: handle of the socket for commands exchange.
ServerName: The server data IP returned by the FTP Server.
Returns:
TCP_SOCKET to use for data transfer in Passive Mode
Close FTP client connection FTPClose(TCP_SOCKET Sockclose);
Closes the client socket specified by the handle.
Parameters:
Sockclose: The handle of the socket to control (the handle returned by the command FTPClientOpen).
Returns:
None
Verify FTP client connection FTPisConn(TCP_SOCKET sockconn);
Verifies the connection of a remote FTP device with the socket.
Parameters:
sockconn: The handle of the socket to control (the handle returned by the command FTPClientOpen).
Returns:
54