Joedb
9.5.0
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
///////////////////////////////////////////////////////////////////////////
12
class
Forward_Channel_Allocation
13
///////////////////////////////////////////////////////////////////////////
14
{
15
protected
:
16
const
ssh_channel
channel
;
17
18
public
:
19
Forward_Channel_Allocation
(
Session
&session);
20
Forward_Channel_Allocation
(
const
Forward_Channel_Allocation
&) =
delete
;
21
Forward_Channel_Allocation
&
operator=
(
const
Forward_Channel_Allocation
&) =
delete
;
22
~Forward_Channel_Allocation
();
23
};
24
25
///////////////////////////////////////////////////////////////////////////
26
class
Forward_Channel
:
27
///////////////////////////////////////////////////////////////////////////
28
public
Forward_Channel_Allocation
,
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
:
37
Forward_Channel
38
(
39
Session
&session,
40
const
char
*remote_host,
41
uint16_t remote_port
42
);
43
44
Forward_Channel
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
Channel.h
Session.h
joedb::Channel
Definition
Channel.h:10
joedb::ssh::Forward_Channel_Allocation
Definition
Forward_Channel.h:14
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:16
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:30
joedb::ssh::Forward_Channel::set_timeout
void set_timeout(std::chrono::milliseconds ms)
Definition
Forward_Channel.h:50
joedb::ssh::Session
Definition
Session.h:117
joedb::ssh
C++ wrappers for libssh.
Definition
Connector.h:8
Generated by
1.9.8