diff options
author | Trevor Norris <trev.norris@gmail.com> | 2014-09-03 03:36:17 -0700 |
---|---|---|
committer | Trevor Norris <trev.norris@gmail.com> | 2014-09-03 03:36:17 -0700 |
commit | a054f8eb29561873f0ae678e579d99f690d3032d (patch) | |
tree | a57e623ddd2d8d7b50255dafa3ae78138a2866bb /src/pipe_wrap.cc | |
parent | 81a9739108bd3959b4b1331d3a2833a18bc2b2b4 (diff) | |
download | android-node-v8-a054f8eb29561873f0ae678e579d99f690d3032d.tar.gz android-node-v8-a054f8eb29561873f0ae678e579d99f690d3032d.tar.bz2 android-node-v8-a054f8eb29561873f0ae678e579d99f690d3032d.zip |
stream_wrap: Add support to write binary strings
node::StringBytes::Write() has appropriate support to write strings with
'binary' encoding. So expose that API through StreamWrap and allow
inheriting classes to use it.
Signed-off-by: Trevor Norris <trev.norris@gmail.com>
Diffstat (limited to 'src/pipe_wrap.cc')
-rw-r--r-- | src/pipe_wrap.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/pipe_wrap.cc b/src/pipe_wrap.cc index 03156cc8f5..05472de5d9 100644 --- a/src/pipe_wrap.cc +++ b/src/pipe_wrap.cc @@ -104,6 +104,9 @@ void PipeWrap::Initialize(Handle<Object> target, StreamWrap::WriteAsciiString); NODE_SET_PROTOTYPE_METHOD(t, "writeUtf8String", StreamWrap::WriteUtf8String); NODE_SET_PROTOTYPE_METHOD(t, "writeUcs2String", StreamWrap::WriteUcs2String); + NODE_SET_PROTOTYPE_METHOD(t, + "writeBinaryString", + StreamWrap::WriteBinaryString); NODE_SET_PROTOTYPE_METHOD(t, "bind", Bind); NODE_SET_PROTOTYPE_METHOD(t, "listen", Listen); |