summaryrefslogtreecommitdiff
path: root/src/stream_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/stream_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/stream_wrap.cc')
-rw-r--r--src/stream_wrap.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/stream_wrap.cc b/src/stream_wrap.cc
index 5d6435101e..0f4da42ad0 100644
--- a/src/stream_wrap.cc
+++ b/src/stream_wrap.cc
@@ -499,6 +499,10 @@ void StreamWrap::WriteUcs2String(const FunctionCallbackInfo<Value>& args) {
WriteStringImpl<UCS2>(args);
}
+void StreamWrap::WriteBinaryString(const FunctionCallbackInfo<Value>& args) {
+ WriteStringImpl<BINARY>(args);
+}
+
void StreamWrap::SetBlocking(const FunctionCallbackInfo<Value>& args) {
Environment* env = Environment::GetCurrent(args.GetIsolate());
HandleScope scope(env->isolate());