Joedb 9.5.0
The Journal-Only Embedded Database
Loading...
Searching...
No Matches
Forward_Channel.h
Go to the documentation of this file.
1#ifndef joedb_ssh_Forward_Channel_declared
2#define joedb_ssh_Forward_Channel_declared
3
5#include "joedb/ssh/Session.h"
6
7#include <chrono>
8
9namespace joedb::ssh
10{
11 ///////////////////////////////////////////////////////////////////////////
13 ///////////////////////////////////////////////////////////////////////////
14 {
15 protected:
16 const ssh_channel channel;
17
18 public:
23 };
24
25 ///////////////////////////////////////////////////////////////////////////
27 ///////////////////////////////////////////////////////////////////////////
29 public joedb::Channel
30 {
31 private:
32 size_t write_some(const char *data, size_t size) final;
33 size_t read_some(char *data, size_t size) final;
34 std::chrono::milliseconds timeout = std::chrono::minutes{30};
35
36 public:
38 (
39 Session &session,
40 const char *remote_host,
41 uint16_t remote_port
42 );
43
45 (
46 Session &session,
47 const char *remote_path
48 );
49
50 void set_timeout(std::chrono::milliseconds ms)
51 {
52 timeout = ms;
53 }
54 };
55}
56
57#endif
Forward_Channel_Allocation & operator=(const Forward_Channel_Allocation &)=delete
Forward_Channel_Allocation(const Forward_Channel_Allocation &)=delete
void set_timeout(std::chrono::milliseconds ms)
C++ wrappers for libssh.
Definition Connector.h:8