forked from tblobaum/node-ssh
/
chan.h
40 lines (30 loc) · 816 Bytes
/
chan.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#ifndef NODE_SSH_CHAN_H
#define NODE_SSH_CHAN_H
#define protected public
#define private public
#include <node.h>
#include <node_object_wrap.h>
#include <node_events.h>
#include <node_buffer.h>
#include <v8.h>
#include <libssh/libssh.h>
#include <libssh/server.h>
#include <libssh/callbacks.h>
#include <deque>
#include <utility>
using namespace v8;
using namespace node;
class Chan : EventEmitter {
public:
ssh_channel channel;
std::deque< std::pair<int, char *> > buffers;
bool done;
Chan();
static Persistent<FunctionTemplate> constructor_template;
static Handle<Value> New(const Arguments &);
static Handle<Value> Create(ssh_channel);
static void Initialize();
static int ReadChannel(eio_req *);
static int ReadChannelAfter(eio_req *);
};
#endif