Joedb
10.0.1
The Journal-Only Embedded Database
Loading...
Searching...
No Matches
src
joedb
ssh
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
4
#include "
joedb/concurrency/Channel.h
"
5
#include "
joedb/ssh/Session.h
"
6
7
#include <chrono>
8
9
namespace
joedb::ssh
10
{
11
class
Forward_Channel_Allocation
12
{
13
protected
:
14
const
ssh_channel
channel
;
15
16
public
:
17
Forward_Channel_Allocation
(
Session
&session);
18
Forward_Channel_Allocation
(
const
Forward_Channel_Allocation
&) =
delete
;
19
Forward_Channel_Allocation
&
operator=
(
const
Forward_Channel_Allocation
&) =
delete
;
20
~Forward_Channel_Allocation
();
21
};
22
23
/// @ingroup concurrency
24
class
Forward_Channel
:
25
public
Forward_Channel_Allocation
,
26
public
joedb::Channel
27
{
28
private
:
29
size_t
write_some(
const
char
*data,
size_t
size)
override
;
30
size_t
read_some(
char
*data,
size_t
size)
override
;
31
std::chrono::milliseconds timeout = std::chrono::minutes{30};
32
33
public
:
34
Forward_Channel
35
(
36
Session
&session,
37
const
char
*remote_host,
38
uint16_t remote_port
39
);
40
41
Forward_Channel
42
(
43
Session
&session,
44
const
char
*remote_path
45
);
46
47
void
set_timeout
(std::chrono::milliseconds ms)
48
{
49
timeout = ms;
50
}
51
};
52
}
53
54
#endif
Channel.h
Session.h
joedb::Channel
Definition
Channel.h:10
joedb::ssh::Forward_Channel_Allocation
Definition
Forward_Channel.h:12
joedb::ssh::Forward_Channel_Allocation::operator=
Forward_Channel_Allocation & operator=(const Forward_Channel_Allocation &)=delete
joedb::ssh::Forward_Channel_Allocation::channel
const ssh_channel channel
Definition
Forward_Channel.h:14
joedb::ssh::Forward_Channel_Allocation::Forward_Channel_Allocation
Forward_Channel_Allocation(const Forward_Channel_Allocation &)=delete
joedb::ssh::Forward_Channel_Allocation::~Forward_Channel_Allocation
~Forward_Channel_Allocation()
Definition
Forward_Channel.cpp:14
joedb::ssh::Forward_Channel
Definition
Forward_Channel.h:27
joedb::ssh::Forward_Channel::set_timeout
void set_timeout(std::chrono::milliseconds ms)
Definition
Forward_Channel.h:47
joedb::ssh::Session
Definition
Session.h:113
joedb::ssh
C++ wrappers for libssh.
Definition
Connector.h:8
Generated by
1.9.8