1
0
mirror of https://github.com/libssh2/libssh2.git synced 2025-08-08 19:02:07 +03:00

send custom channel requests

This commit is contained in:
Anders Borum
2021-12-02 15:58:24 +01:00
parent 5f7c32c8bf
commit 1615d0a867
3 changed files with 142 additions and 0 deletions

View File

@@ -816,6 +816,19 @@ LIBSSH2_API int libssh2_channel_process_startup(LIBSSH2_CHANNEL *channel,
sizeof("subsystem") - 1, (subsystem), \
(unsigned int)strlen(subsystem))
/* Deliver custom channel request.
data is allowed to be NULL when data_len is zero
While you can wait for reply this needs to be either success or failure as
there is no way to bring back anything else. */
LIBSSH2_API int libssh2_channel_custom_request(LIBSSH2_CHANNEL *channel,
int want_reply,
const char *request_type,
unsigned int request_type_len,
const char *data,
unsigned int data_len);
LIBSSH2_API ssize_t libssh2_channel_read_ex(LIBSSH2_CHANNEL *channel,
int stream_id, char *buf,
size_t buflen);