Can someone explain me the libssh2_scp_recv2()
function from libssh2 lib?
According to this I need to input the session var (LIBSSH2_SESSION *session
), the path to the file I want (const char *path
) and a struct with information of the file I want (struct_stat *sb
).
Where is the part I receive the data from that file? Because what return is a pointer to the channel.
I found the answer!
This function is only to make a request to that session and them it's just read it like a ssh output using the libssh2_channel_read()
function.