returning a block of data from a native module

19 views
Skip to first unread message

Pawel Por

unread,
Sep 1, 2014, 7:46:51 AM9/1/14
to nod...@googlegroups.com
Hi,

How can I return a block of data from a native module to javascript.
The following causes some kind of converison:
obj->Set(String::New("name"), String::New(frag->getContent().getBytes(), frag->getContent().length()));

and the following does not compile:
obj->Set(String::New("name"), node::Buffer::New(frag->getContent().getBytes(), frag->getContent().length()));

thanks for help
Reply all
Reply to author
Forward
0 new messages