1 #ifndef SRC_PIPE_WRAP_H_
2 #define SRC_PIPE_WRAP_H_
4 #include "async-wrap.h"
6 #include "stream_wrap.h"
10 class PipeWrap : public StreamWrap {
12 uv_pipe_t* UVHandle();
14 static v8::Local<v8::Object> Instantiate(Environment* env, AsyncWrap* parent);
15 static void Initialize(v8::Local<v8::Object> target,
16 v8::Local<v8::Value> unused,
17 v8::Local<v8::Context> context);
19 size_t self_size() const override { return sizeof(*this); }
22 PipeWrap(Environment* env,
23 v8::Local<v8::Object> object,
27 static void New(const v8::FunctionCallbackInfo<v8::Value>& args);
28 static void Bind(const v8::FunctionCallbackInfo<v8::Value>& args);
29 static void Listen(const v8::FunctionCallbackInfo<v8::Value>& args);
30 static void Connect(const v8::FunctionCallbackInfo<v8::Value>& args);
31 static void Open(const v8::FunctionCallbackInfo<v8::Value>& args);
34 static void SetPendingInstances(
35 const v8::FunctionCallbackInfo<v8::Value>& args);
38 static void OnConnection(uv_stream_t* handle, int status);
39 static void AfterConnect(uv_connect_t* req, int status);
48 #endif // SRC_PIPE_WRAP_H_