diff --git a/include/SFML/Network/Ftp.hpp b/include/SFML/Network/Ftp.hpp index d3bf1a352..1b43078f6 100644 --- a/include/SFML/Network/Ftp.hpp +++ b/include/SFML/Network/Ftp.hpp @@ -486,6 +486,13 @@ public : //////////////////////////////////////////////////////////// /// \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 parameter Command parameter /// @@ -500,7 +507,7 @@ private: /// \brief Receive a response from the server /// /// 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 /// @@ -541,13 +548,15 @@ private: /// \li Connecting to the FTP server /// \li Logging in (either as a registered user or anonymously) /// \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 /// 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 -/// 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 /// time to complete. This is important to know if you don't want @@ -584,6 +593,11 @@ private: /// if (response.isOk()) /// 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) /// ftp.disconnect(); /// \endcode