Added ssh_channel_write_stderr() for the server
Этот коммит содержится в:
родитель
2617024136
Коммит
524302ca7e
@ -199,6 +199,9 @@ LIBSSH_API int ssh_channel_request_send_exit_signal(ssh_channel channel,
|
||||
int core,
|
||||
const char *errmsg,
|
||||
const char *lang);
|
||||
LIBSSH_API int ssh_channel_write_stderr(ssh_channel channel,
|
||||
const void *data,
|
||||
uint32_t len);
|
||||
|
||||
/* deprecated functions */
|
||||
SSH_DEPRECATED LIBSSH_API int ssh_accept(ssh_session session);
|
||||
|
@ -2595,6 +2595,23 @@ int ssh_channel_select(ssh_channel *readchans, ssh_channel *writechans,
|
||||
}
|
||||
|
||||
#if WITH_SERVER
|
||||
/**
|
||||
* @brief Blocking write on a channel stderr.
|
||||
*
|
||||
* @param[in] channel The channel to write to.
|
||||
*
|
||||
* @param[in] data A pointer to the data to write.
|
||||
*
|
||||
* @param[in] len The length of the buffer to write to.
|
||||
*
|
||||
* @return The number of bytes written, SSH_ERROR on error.
|
||||
*
|
||||
* @see channel_read()
|
||||
*/
|
||||
int ssh_channel_write_stderr(ssh_channel channel, const void *data, uint32_t len) {
|
||||
return channel_write_common(channel, data, len, 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Open a TCP/IP reverse forwarding channel.
|
||||
*
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user