MCPcopy Create free account
hub / github.com/Predelnik/DSpellCheck / Passive

Method Passive

deps/FtpClient/FTPClient.cpp:1327–1340  ·  view source on GitHub ↗

Executes the FTP command PASV. Set the passive mode. This command requests the server-DTP (data transfer process) on a data to "listen" port (which is not its default data port) and to wait for a connection rather than initiate one upon receipt of a transfer command. The response to this command includes the host and port address this server is listening on. @param[out] ulIpAddress IP address the

Source from the content-addressed store, hash-verified

1325/// @param[out] ushPort Port the server is listening on.
1326/// @return see return values of CFTPClient::SimpleErrorCheck
1327int CFTPClient::Passive(ULONG& ulIpAddress, USHORT& ushPort) const
1328{
1329 CReply Reply;
1330 if( !SendCommand(CCommand::PASV(), CArg(), Reply) )
1331 return FTP_ERROR;
1332
1333 if( Reply.Code().IsPositiveCompletionReply() )
1334 {
1335 if( !GetIpAddressFromResponse(Reply.Value(), ulIpAddress, ushPort) )
1336 return FTP_ERROR;
1337 }
1338
1339 return SimpleErrorCheck(Reply);
1340}
1341
1342/// Parses a response string and extracts the ip address and port information.
1343/// @param[in] strResponse The response string of a FTP server which holds

Callers 1

TransferFileMethod · 0.80

Calls 3

CArgClass · 0.85
ValueMethod · 0.80

Tested by

no test coverage detected