Node.js
v8.x
Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine
|
Data Structures | |
class | Agent |
class | Closer |
class | DispatchMessagesTask |
struct | http_parsing_state_s |
class | InspectorIo |
class | InspectorIoDelegate |
class | InspectorSessionDelegate |
class | InspectorSocket |
class | InspectorSocketServer |
class | IoSessionDelegate |
class | NodeInspectorClient |
class | ServerSocket |
class | SocketServerDelegate |
class | SocketSession |
struct | WriteRequest |
struct | ws_state_s |
Typedefs | |
typedef int | OpCode |
typedef void(* | inspector_cb) (InspectorSocket *, int) |
typedef bool(* | handshake_cb) (InspectorSocket *, enum inspector_handshake_event state, const std::string &path) |
Enumerations | |
enum | InspectorAction { kStartSession, kEndSession, kSendMessage } |
enum | TransportAction { kKill, kSendMessage, kStop } |
enum | ws_decode_result { FRAME_OK, FRAME_INCOMPLETE, FRAME_CLOSE, FRAME_ERROR } |
enum | inspector_handshake_event { kInspectorHandshakeUpgrading, kInspectorHandshakeUpgraded, kInspectorHandshakeHttpGet, kInspectorHandshakeFailed } |
Functions | |
void | Open (const FunctionCallbackInfo< Value > &args) |
void | Url (const FunctionCallbackInfo< Value > &args) |
std::unique_ptr< StringBuffer > | Utf8ToStringView (const std::string &message) |
void | InterruptCallback (v8::Isolate *, void *agent) |
std::string | FormatWsAddress (const std::string &host, int port, const std::string &target_id, bool include_protocol) |
int | inspector_read_start (InspectorSocket *inspector, uv_alloc_cb alloc_cb, uv_read_cb read_cb) |
void | inspector_read_stop (InspectorSocket *inspector) |
int | inspector_accept (uv_stream_t *server, InspectorSocket *socket, handshake_cb callback) |
void | inspector_write (InspectorSocket *inspector, const char *data, size_t len) |
void | inspector_close (InspectorSocket *inspector, inspector_cb callback) |
bool | inspector_is_active (const InspectorSocket *inspector) |
InspectorSocket * | inspector_from_stream (uv_tcp_t *stream) |
InspectorSocket * | inspector_from_stream (uv_stream_t *stream) |
InspectorSocket * | inspector_from_stream (uv_handle_t *stream) |
Variables | |
const OpCode | kOpCodeContinuation = 0x0 |
const OpCode | kOpCodeText = 0x1 |
const OpCode | kOpCodeBinary = 0x2 |
const OpCode | kOpCodeClose = 0x8 |
const OpCode | kOpCodePing = 0x9 |
const OpCode | kOpCodePong = 0xA |
const unsigned char | kFinalBit = 0x80 |
const unsigned char | kReserved1Bit = 0x40 |
const unsigned char | kReserved2Bit = 0x20 |
const unsigned char | kReserved3Bit = 0x10 |
const unsigned char | kOpCodeMask = 0xF |
const unsigned char | kMaskBit = 0x80 |
const unsigned char | kPayloadLengthMask = 0x7F |
const size_t | kMaxSingleBytePayloadLength = 125 |
const size_t | kTwoBytePayloadLengthField = 126 |
const size_t | kEightBytePayloadLengthField = 127 |
const size_t | kMaskingKeyWidthInBytes = 4 |
typedef bool(* handshake_cb) (InspectorSocket *, enum inspector_handshake_event state, const std::string &path) |
Definition at line 28 of file inspector_socket.h.
typedef void(* inspector_cb) (InspectorSocket *, int) |
Definition at line 24 of file inspector_socket.h.
typedef int OpCode |
Definition at line 116 of file inspector_socket.cc.
Enumerator | |
---|---|
kInspectorHandshakeUpgrading | |
kInspectorHandshakeUpgraded | |
kInspectorHandshakeHttpGet | |
kInspectorHandshakeFailed |
Definition at line 15 of file inspector_socket.h.
|
strong |
Enumerator | |
---|---|
kStartSession | |
kEndSession | |
kSendMessage |
Definition at line 37 of file inspector_io.h.
|
strong |
Enumerator | |
---|---|
kKill | |
kSendMessage | |
kStop |
Definition at line 44 of file inspector_io.h.
enum ws_decode_result |
Enumerator | |
---|---|
FRAME_OK | |
FRAME_INCOMPLETE | |
FRAME_CLOSE | |
FRAME_ERROR |
Definition at line 24 of file inspector_socket.cc.
std::string FormatWsAddress | ( | const std::string & | host, |
int | port, | ||
const std::string & | target_id, | ||
bool | include_protocol | ||
) |
Definition at line 17 of file inspector_socket_server.cc.
References buf, InspectorSocket::data, data, host, inspector_write(), len, and NODE_VERSION.
Referenced by InspectorSocketServer::HandleGetRequest().
int inspector_accept | ( | uv_stream_t * | server, |
InspectorSocket * | socket, | ||
handshake_cb | callback | ||
) |
Definition at line 562 of file inspector_socket.cc.
References InspectorSocket::http_parsing_state, and InspectorSocket::tcp.
Referenced by SocketSession::Accept().
void inspector_close | ( | InspectorSocket * | inspector, |
inspector_cb | callback | ||
) |
Definition at line 596 of file inspector_socket.cc.
References ws_state_s::close_cb, InspectorSocket::connection_eof, InspectorSocket::shutting_down, InspectorSocket::tcp, and InspectorSocket::ws_state.
Referenced by SocketSession::Close().
|
inline |
Definition at line 86 of file inspector_socket.h.
References InspectorSocket::tcp.
Referenced by SocketSession::Accept(), inspector_from_stream(), and inspector_read_stop().
|
inline |
Definition at line 90 of file inspector_socket.h.
References inspector_from_stream().
|
inline |
Definition at line 94 of file inspector_socket.h.
References inspector_from_stream().
bool inspector_is_active | ( | const InspectorSocket * | inspector | ) |
Definition at line 614 of file inspector_socket.cc.
References InspectorSocket::shutting_down, and InspectorSocket::tcp.
int inspector_read_start | ( | InspectorSocket * | inspector, |
uv_alloc_cb | alloc_cb, | ||
uv_read_cb | read_cb | ||
) |
Definition at line 362 of file inspector_socket.cc.
References ws_state_s::alloc_cb, ws_state_s::close_sent, ws_state_s::read_cb, InspectorSocket::shutting_down, InspectorSocket::tcp, InspectorSocket::ws_mode, and InspectorSocket::ws_state.
Referenced by SocketSession::Accept().
void inspector_read_stop | ( | InspectorSocket * | inspector | ) |
Definition at line 379 of file inspector_socket.cc.
References ACCEPT_KEY_LENGTH, ws_state_s::alloc_cb, http_parsing_state_s::callback, WriteRequest::from_write_req(), InspectorSocket::http_parsing_state, WriteRequest::inspector, inspector_from_stream(), kInspectorHandshakeFailed, kInspectorHandshakeUpgraded, http_parsing_state_s::parsing_value, http_parsing_state_s::path, ws_state_s::read_cb, InspectorSocket::tcp, InspectorSocket::ws_mode, and InspectorSocket::ws_state.
void inspector_write | ( | InspectorSocket * | inspector, |
const char * | data, | ||
size_t | len | ||
) |
Definition at line 586 of file inspector_socket.cc.
References InspectorSocket::ws_mode.
Referenced by FormatWsAddress(), and SocketSession::Send().
void node::inspector::InterruptCallback | ( | v8::Isolate * | , |
void * | agent | ||
) |
Definition at line 175 of file inspector_io.cc.
void node::inspector::Open | ( | const FunctionCallbackInfo< Value > & | args | ) |
Definition at line 872 of file inspector_agent.cc.
void node::inspector::Url | ( | const FunctionCallbackInfo< Value > & | args | ) |
Definition at line 894 of file inspector_agent.cc.
std::unique_ptr< v8_inspector::StringBuffer > Utf8ToStringView | ( | const std::string & | message | ) |
Definition at line 125 of file inspector_io.cc.
Referenced by NodeInspectorClient::contextCreated(), and InspectorIo::PostIncomingMessage().
const size_t kEightBytePayloadLengthField = 127 |
Definition at line 135 of file inspector_socket.cc.
const unsigned char kFinalBit = 0x80 |
Definition at line 125 of file inspector_socket.cc.
const unsigned char kMaskBit = 0x80 |
Definition at line 130 of file inspector_socket.cc.
const size_t kMaskingKeyWidthInBytes = 4 |
Definition at line 136 of file inspector_socket.cc.
const size_t kMaxSingleBytePayloadLength = 125 |
Definition at line 133 of file inspector_socket.cc.
const OpCode kOpCodeBinary = 0x2 |
Definition at line 120 of file inspector_socket.cc.
const OpCode kOpCodeClose = 0x8 |
Definition at line 121 of file inspector_socket.cc.
const OpCode kOpCodeContinuation = 0x0 |
Definition at line 118 of file inspector_socket.cc.
const unsigned char kOpCodeMask = 0xF |
Definition at line 129 of file inspector_socket.cc.
const OpCode kOpCodePing = 0x9 |
Definition at line 122 of file inspector_socket.cc.
const OpCode kOpCodePong = 0xA |
Definition at line 123 of file inspector_socket.cc.
const OpCode kOpCodeText = 0x1 |
Definition at line 119 of file inspector_socket.cc.
const unsigned char kPayloadLengthMask = 0x7F |
Definition at line 131 of file inspector_socket.cc.
const unsigned char kReserved1Bit = 0x40 |
Definition at line 126 of file inspector_socket.cc.
const unsigned char kReserved2Bit = 0x20 |
Definition at line 127 of file inspector_socket.cc.
const unsigned char kReserved3Bit = 0x10 |
Definition at line 128 of file inspector_socket.cc.
const size_t kTwoBytePayloadLengthField = 126 |
Definition at line 134 of file inspector_socket.cc.