forked from JacobFischer/netlinkwrapper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnetlinkwrapper.h
31 lines (23 loc) · 906 Bytes
/
netlinkwrapper.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
#ifndef NETLINKOBJECT_H
#define NETLINKOBJECT_H
#include <node.h>
#include <node_object_wrap.h>
#include "netlink/socket.h"
class NetLinkWrapper : public node::ObjectWrap
{
public:
static void Init(v8::Handle<v8::Object> exports);
private:
NL::Socket* socket;
explicit NetLinkWrapper();
~NetLinkWrapper();
static void New(const v8::FunctionCallbackInfo<v8::Value>& args);
static void Connect(const v8::FunctionCallbackInfo<v8::Value>& args);
static void Blocking(const v8::FunctionCallbackInfo<v8::Value>& args);
static void Read(const v8::FunctionCallbackInfo<v8::Value>& args);
static void Send(const v8::FunctionCallbackInfo<v8::Value>& args);
static void Disconnect(const v8::FunctionCallbackInfo<v8::Value>& args);
static v8::Persistent<v8::Function> constructor;
double value_;
};
#endif