mirror of
https://github.com/SFML/SFML.git
synced 2024-11-25 04:41:05 +08:00
Improved Ftp::sendCommand() documentation
This commit is contained in:
parent
0227e5c51e
commit
1319a0a096
@ -486,6 +486,13 @@ public :
|
|||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
/// \brief Send a command to the FTP server
|
/// \brief Send a command to the FTP server
|
||||||
///
|
///
|
||||||
|
/// While the most often used commands are provided as member
|
||||||
|
/// functions in the sf::Ftp class, this method can be used
|
||||||
|
/// to send any FTP command to the server. If the command
|
||||||
|
/// requires one or more parameters, they can be specified
|
||||||
|
/// in \a parameter. If the server returns information, you
|
||||||
|
/// can extract it from the response using Response::getMessage().
|
||||||
|
///
|
||||||
/// \param command Command to send
|
/// \param command Command to send
|
||||||
/// \param parameter Command parameter
|
/// \param parameter Command parameter
|
||||||
///
|
///
|
||||||
@ -500,7 +507,7 @@ private:
|
|||||||
/// \brief Receive a response from the server
|
/// \brief Receive a response from the server
|
||||||
///
|
///
|
||||||
/// This function must be called after each call to
|
/// This function must be called after each call to
|
||||||
/// SendCommand that expects a response.
|
/// sendCommand that expects a response.
|
||||||
///
|
///
|
||||||
/// \return Server response to the request
|
/// \return Server response to the request
|
||||||
///
|
///
|
||||||
@ -541,13 +548,15 @@ private:
|
|||||||
/// \li Connecting to the FTP server
|
/// \li Connecting to the FTP server
|
||||||
/// \li Logging in (either as a registered user or anonymously)
|
/// \li Logging in (either as a registered user or anonymously)
|
||||||
/// \li Sending commands to the server
|
/// \li Sending commands to the server
|
||||||
/// \li Disconnecting (this part can be done implicitely by the destructor)
|
/// \li Disconnecting (this part can be done implicitly by the destructor)
|
||||||
///
|
///
|
||||||
/// Every command returns a FTP response, which contains the
|
/// Every command returns a FTP response, which contains the
|
||||||
/// status code as well as a message from the server. Some
|
/// status code as well as a message from the server. Some
|
||||||
/// commands such as getWorkingDirectory and getDirectoryListing
|
/// commands such as getWorkingDirectory() and getDirectoryListing()
|
||||||
/// return additional data, and use a class derived from
|
/// return additional data, and use a class derived from
|
||||||
/// sf::Ftp::Response to provide this data.
|
/// sf::Ftp::Response to provide this data. The most often used
|
||||||
|
/// commands are directly provided as member functions, but it is
|
||||||
|
/// also possible to use specific commands with the sendCommand() method.
|
||||||
///
|
///
|
||||||
/// All commands, especially upload and download, may take some
|
/// All commands, especially upload and download, may take some
|
||||||
/// time to complete. This is important to know if you don't want
|
/// time to complete. This is important to know if you don't want
|
||||||
@ -584,6 +593,11 @@ private:
|
|||||||
/// if (response.isOk())
|
/// if (response.isOk())
|
||||||
/// std::cout << "File uploaded" << std::endl;
|
/// std::cout << "File uploaded" << std::endl;
|
||||||
///
|
///
|
||||||
|
/// // Send specific commands (here: FEAT to list supported FTP features)
|
||||||
|
/// response = ftp.sendCommand("FEAT");
|
||||||
|
/// if (response.isOk())
|
||||||
|
/// std::cout << "Feature list:\n" << response.getMessage() << std::endl;
|
||||||
|
///
|
||||||
/// // Disconnect from the server (optional)
|
/// // Disconnect from the server (optional)
|
||||||
/// ftp.disconnect();
|
/// ftp.disconnect();
|
||||||
/// \endcode
|
/// \endcode
|
||||||
|
Loading…
Reference in New Issue
Block a user