end: The socket has been disconnected. No argument. close: The socket was closed.on(eventType, listener) Adds the specified listener to the specified event type. It the event type is error, the listener should accept 1 argument, which will be an Error object. The event handlers for end ...
The reason is that when libssh fails to write data to the server, the error code is set to SSH_FX_FAILURE. Is it possible to remove this error code in the error judgment condition? Or can we add a limit on the number of failures? The log when there is infinite creation of directori...
The need for both global listeners and temporary promise listeners is because network end, close or error events can occur at any time, including in-betwseen API calls. During an API call, a promise is active and can be used to communicate event information back to the calling code via no...
when you call theend()method, the connection is closed. On windows, this also results in aconnection reset by peererror. While it could be argued that the remote server resetting the connection after receiving a disconnect request is not an error, it doesn't change...
If a TCP connection is established, and neither side is reading or writing the socket (i.e. both sides are doing nothing), then you can disconnect the network cable from the computer for any length of time, and then re-connect, and the TCP connection is not affected. A TCP connection...
strLastError = ostr.str(); nR = -6; break; } } while (rc > 0); libssh2_sftp_close(sftp_handle); libssh2_sftp_shutdown(sftp_session); shutdown: libssh2_session_disconnect(session, "Normal Shutdown, Thank you for playing"); libssh2_session_free(session); closesocket(sock); fclose(lo...
7 kagula::network::SFTP_Init();8 9//测试SFTP链接 10 kagula::network::SFTP_Libssh2* client = kagula::network::SFTP_Libssh2::Inst();11 std::string ip = "192.168.19.130";12 uint16_t port = 22;13 std::string usr = "kagula";14 std::string pwd = "123456";15...
1#include"SFTP_Libssh2.h"2#include <iostream>34intmain(intargc,char*argv[])5{6//下面的代码只要在进程初始化的时候执行7kagula::network::SFTP_Init();89//测试SFTP链接10kagula::network::SFTP_Libssh2* client =kagula::network::SFTP_Libssh2::Inst();11std::stringip ="192.168.19.130";12uint16...
strLastError = ostr.str(); libssh2_session_disconnect(m_session, "Normal Shutdown, Thank you for playing"); libssh2_session_free(m_session); closesocket(m_sock); return bR; } bR = true; return bR; } bool SFTP_Libssh2::SFTPDisconnect() { libssh2_sftp_shutdown(m_sftp...
debug1: Unspecified GSS failure. Minor code may provide more information Cannot determine realm for numeric host address debug1: Next authentication method: publickey //先尝试公钥 debug1: Trying private key: /root/.ssh/identity debug1: Trying private key: /root/.ssh/id_rsa ...