FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
node/src/stream_wrap.h at debugProcess · wave2future/node · GitHub
wave2future
node
Repository navigation
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
node
/
src
/
stream_wrap.h
Copy path
More file actions
More file actions
Latest commit
History
History
History
51 lines (37 loc) · 1.45 KB
Breadcrumbs
node
/
src
/
stream_wrap.h
Copy path
File metadata and controls
51 lines (37 loc) · 1.45 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#
ifndef
STREAM_WRAP_H_
#
define
STREAM_WRAP_H_
#
include
<
v8.h
>
#
include
<
node.h
>
#
include
<
handle_wrap.h
>
namespace
node
{
class
StreamWrap
:
public
HandleWrap
{
public:
uv_stream_t
*
GetStream
() {
return
stream_; }
static
void
Initialize
(v8::Handle<v8::Object> target);
//
JavaScript functions
static
v8::Handle<v8::Value>
Write
(
const
v8::Arguments& args);
static
v8::Handle<v8::Value>
ReadStart
(
const
v8::Arguments& args);
static
v8::Handle<v8::Value>
ReadStop
(
const
v8::Arguments& args);
static
v8::Handle<v8::Value>
Shutdown
(
const
v8::Arguments& args);
protected:
StreamWrap
(v8::Handle<v8::Object> object,
uv_stream_t
* stream);
virtual
~StreamWrap
() { }
virtual
void
SetHandle
(
uv_handle_t
* h);
void
StateChange
() { }
void
UpdateWriteQueueSize
();
private:
static
inline
char
*
NewSlab
(v8::Handle<v8::Object> global, v8::Handle<v8::Object> wrap_obj);
//
Callbacks for libuv
static
void
AfterWrite
(
uv_write_t
* req,
int
status);
static
uv_buf_t
OnAlloc
(
uv_handle_t
* handle,
size_t
suggested_size);
static
void
AfterShutdown
(
uv_shutdown_t
* req,
int
status);
static
void
OnRead
(
uv_stream_t
* handle,
ssize_t
nread,
uv_buf_t
buf);
static
void
OnRead2
(
uv_pipe_t
* handle,
ssize_t
nread,
uv_buf_t
buf,
uv_handle_type pending);
static
void
OnReadCommon
(
uv_stream_t
* handle,
ssize_t
nread,
uv_buf_t
buf, uv_handle_type pending);
size_t
slab_offset_;
uv_stream_t
* stream_;
};
}
//
namespace node
#
endif
//
STREAM_WRAP_H_
Back
|
FazBrowse Home
|
New Git URL