summaryrefslogtreecommitdiff
path: root/src/tty_wrap.cc
diff options
context:
space:
mode:
authorTrevor Norris <trev.norris@gmail.com>2014-09-03 03:36:17 -0700
committerTrevor Norris <trev.norris@gmail.com>2014-09-03 03:36:17 -0700
commita054f8eb29561873f0ae678e579d99f690d3032d (patch)
treea57e623ddd2d8d7b50255dafa3ae78138a2866bb /src/tty_wrap.cc
parent81a9739108bd3959b4b1331d3a2833a18bc2b2b4 (diff)
downloadandroid-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/tty_wrap.cc')
-rw-r--r--src/tty_wrap.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/tty_wrap.cc b/src/tty_wrap.cc
index dba545b5f4..34ee14dec7 100644
--- a/src/tty_wrap.cc
+++ b/src/tty_wrap.cc
@@ -78,6 +78,9 @@ void TTYWrap::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, "getWindowSize", TTYWrap::GetWindowSize);
NODE_SET_PROTOTYPE_METHOD(t, "setRawMode", SetRawMode);