mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-07-19 07:03:12 +03:00
Make the transfer buffer size configurable
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com> Reviewed-by: Jakub Jelen <jjelen@redhat.com> Change-Id: I5052bac703b5a0c289ca5c28569cadeb54d3d507
This commit is contained in:
@ -34,6 +34,11 @@ clients must be made or how a client should react.
|
||||
#include <fcntl.h>
|
||||
|
||||
#include "examples_common.h"
|
||||
|
||||
#ifndef BUF_SIZE
|
||||
#define BUF_SIZE 4096
|
||||
#endif
|
||||
|
||||
char *host;
|
||||
const char *desthost="localhost";
|
||||
const char *port="22";
|
||||
@ -77,7 +82,7 @@ static int opts(int argc, char **argv){
|
||||
static void select_loop(ssh_session session,ssh_channel channel){
|
||||
fd_set fds;
|
||||
struct timeval timeout;
|
||||
char buffer[4096];
|
||||
char buffer[BUF_SIZE];
|
||||
/* channels will be set to the channels to poll.
|
||||
* outchannels will contain the result of the poll
|
||||
*/
|
||||
|
Reference in New Issue
Block a user