MCPcopy Create free account
hub / github.com/SFML/SFML / login

Method login

src/SFML/Network/Sftp.cpp:774–799  ·  view source on GitHub ↗

///////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

772
773////////////////////////////////////////////////////////////
774Sftp::Result Sftp::login(std::string_view name, std::string_view password, const TimeoutWithPredicate& timeout)
775{
776 // Perform login
777 {
778 const auto result = m_impl->waitForOperationComplete(
779 [&]
780 {
781 return libssh2_userauth_password_ex(m_impl->ssh2Session.get(),
782 name.data(),
783 static_cast<unsigned int>(name.size()),
784 password.data(),
785 static_cast<unsigned int>(password.size()),
786 nullptr);
787 },
788 timeout);
789
790 if (result == LIBSSH2_ERROR_EAGAIN)
791 return Result(Result::Value::Timeout);
792
793 if (result < 0)
794 return makeError(m_impl->ssh2Session.get());
795 }
796
797 // Initialize SFTP session
798 return m_impl->initializeSftp(timeout);
799}
800
801
802////////////////////////////////////////////////////////////

Callers

nothing calls this directly

Calls 5

makeErrorFunction · 0.85
getMethod · 0.80
initializeSftpMethod · 0.80
lengthMethod · 0.80

Tested by

no test coverage detected