#ifndef TCP_WRAP_H_ #define TCP_WRAP_H_ #include namespace node { class TCPWrap : public StreamWrap { public: static v8::Local Instantiate(); static TCPWrap* Unwrap(v8::Local obj); static void Initialize(v8::Handle target); private: TCPWrap(v8::Handle object); ~TCPWrap(); static v8::Handle New(const v8::Arguments& args); static v8::Handle GetSockName(const v8::Arguments& args); static v8::Handle GetPeerName(const v8::Arguments& args); static v8::Handle SetNoDelay(const v8::Arguments& args); static v8::Handle SetKeepAlive(const v8::Arguments& args); static v8::Handle Bind(const v8::Arguments& args); static v8::Handle Bind6(const v8::Arguments& args); static v8::Handle Listen(const v8::Arguments& args); static v8::Handle Connect(const v8::Arguments& args); static v8::Handle Connect6(const v8::Arguments& args); static v8::Handle Open(const v8::Arguments& args); static void OnConnection(uv_stream_t* handle, int status); static void AfterConnect(uv_connect_t* req, int status); uv_tcp_t handle_; }; } // namespace node #endif // TCP_WRAP_H_