Skip to content

Commit

Permalink
add new symbols to test and remove exports from bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
reqshark committed Feb 8, 2016
1 parent 4a299fd commit ef9c804
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/node_nanomsg.cc
Original file line number Diff line number Diff line change
Expand Up @@ -333,13 +333,6 @@ NAN_MODULE_INIT(InitAll) {
Nan::Set(target, Nan::New(symbol_name).ToLocalChecked(),
Nan::New<Number>(value));
}
Nan::Set(target, Nan::New("NN_WS").ToLocalChecked(),Nan::New<Number>(-4));
Nan::Set(target,
Nan::New("NN_WS_MSG_TYPE").ToLocalChecked(),Nan::New<Number>(1));
Nan::Set(target,
Nan::New("NN_WS_MSG_TYPE_TEXT").ToLocalChecked(),Nan::New<Number>(0x01));
Nan::Set(target,
Nan::New("NN_WS_MSG_TYPE_BINARY").ToLocalChecked(),Nan::New<Number>(0x02));
}

NODE_MODULE(node_nanomsg, InitAll)
32 changes: 32 additions & 0 deletions test/symbols.js
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,14 @@ exports.symbols = [
'type': nn.NN_TYPE_NONE,
'unit': nn.NN_UNIT_NONE

},
{
'value': nn.NN_WS,
'name': "NN_WS",
'ns': nn.NN_NS_TRANSPORT,
'type': nn.NN_TYPE_NONE,
'unit': nn.NN_UNIT_NONE

},
{
'value': nn.NN_PAIR,
Expand Down Expand Up @@ -506,6 +514,14 @@ exports.symbols = [
'type': nn.NN_TYPE_INT,
'unit': nn.NN_UNIT_BOOLEAN

},
{
'value': nn.NN_WS_MSG_TYPE,
'name': "NN_WS_MSG_TYPE",
'ns': nn.NN_NS_TRANSPORT_OPTION,
'type': nn.NN_TYPE_INT,
'unit': nn.NN_UNIT_NONE

},
{
'value': nn.NN_DONTWAIT,
Expand All @@ -514,6 +530,22 @@ exports.symbols = [
'type': nn.NN_TYPE_NONE,
'unit': nn.NN_UNIT_NONE

},
{
'value': nn.NN_WS_MSG_TYPE_TEXT,
'name': "NN_WS_MSG_TYPE_TEXT",
'ns': nn.NN_NS_FLAG,
'type': nn.NN_TYPE_NONE,
'unit': nn.NN_UNIT_NONE

},
{
'value': nn.NN_WS_MSG_TYPE_BINARY,
'name': "NN_WS_MSG_TYPE_BINARY",
'ns': nn.NN_NS_FLAG,
'type': nn.NN_TYPE_NONE,
'unit': nn.NN_UNIT_NONE

},
{
'value': nn.NN_POLLIN,
Expand Down

0 comments on commit ef9c804

Please sign in to comment.