mirror of
https://github.com/nodejs/node.git
synced 2026-11-24 21:50:36 -05:00
This should help clarify what kind of resource a `StreamWrap` represents. PR-URL: https://github.com/nodejs/node/pull/16157 Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
38 lines
775 B
C++
38 lines
775 B
C++
#ifndef SRC_CONNECTION_WRAP_H_
|
|
#define SRC_CONNECTION_WRAP_H_
|
|
|
|
#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
|
|
|
|
#include "env.h"
|
|
#include "stream_wrap.h"
|
|
#include "v8.h"
|
|
|
|
namespace node {
|
|
|
|
template <typename WrapType, typename UVType>
|
|
class ConnectionWrap : public LibuvStreamWrap {
|
|
public:
|
|
UVType* UVHandle() {
|
|
return &handle_;
|
|
}
|
|
|
|
static void OnConnection(uv_stream_t* handle, int status);
|
|
static void AfterConnect(uv_connect_t* req, int status);
|
|
|
|
protected:
|
|
ConnectionWrap(Environment* env,
|
|
v8::Local<v8::Object> object,
|
|
ProviderType provider);
|
|
~ConnectionWrap() {
|
|
}
|
|
|
|
UVType handle_;
|
|
};
|
|
|
|
|
|
} // namespace node
|
|
|
|
#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
|
|
|
|
#endif // SRC_CONNECTION_WRAP_H_
|