summaryrefslogtreecommitdiff
path: root/src/stream_base-inl.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/stream_base-inl.h')
-rw-r--r--src/stream_base-inl.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/stream_base-inl.h b/src/stream_base-inl.h
index 807e138ef7..29739011c6 100644
--- a/src/stream_base-inl.h
+++ b/src/stream_base-inl.h
@@ -143,15 +143,19 @@ void StreamBase::JSMethod(const FunctionCallbackInfo<Value>& args) {
}
+inline void ShutdownWrap::OnDone(int status) {
+ stream()->AfterShutdown(this, status);
+}
+
+
WriteWrap* WriteWrap::New(Environment* env,
Local<Object> obj,
StreamBase* wrap,
- DoneCb cb,
size_t extra) {
size_t storage_size = ROUND_UP(sizeof(WriteWrap), kAlignSize) + extra;
char* storage = new char[storage_size];
- return new(storage) WriteWrap(env, obj, wrap, cb, storage_size);
+ return new(storage) WriteWrap(env, obj, wrap, storage_size);
}
@@ -171,6 +175,10 @@ size_t WriteWrap::ExtraSize() const {
return storage_size_ - ROUND_UP(sizeof(*this), kAlignSize);
}
+inline void WriteWrap::OnDone(int status) {
+ stream()->AfterWrite(this, status);
+}
+
} // namespace node
#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS