Node.js  v8.x
Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine
node::inspector Namespace Reference

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)
 
InspectorSocketinspector_from_stream (uv_tcp_t *stream)
 
InspectorSocketinspector_from_stream (uv_stream_t *stream)
 
InspectorSocketinspector_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 Documentation

◆ handshake_cb

typedef bool(* handshake_cb) (InspectorSocket *, enum inspector_handshake_event state, const std::string &path)

Definition at line 28 of file inspector_socket.h.

◆ inspector_cb

typedef void(* inspector_cb) (InspectorSocket *, int)

Definition at line 24 of file inspector_socket.h.

◆ OpCode

typedef int OpCode

Definition at line 116 of file inspector_socket.cc.

Enumeration Type Documentation

◆ inspector_handshake_event

Enumerator
kInspectorHandshakeUpgrading 
kInspectorHandshakeUpgraded 
kInspectorHandshakeHttpGet 
kInspectorHandshakeFailed 

Definition at line 15 of file inspector_socket.h.

◆ InspectorAction

enum InspectorAction
strong
Enumerator
kStartSession 
kEndSession 
kSendMessage 

Definition at line 37 of file inspector_io.h.

◆ TransportAction

enum TransportAction
strong
Enumerator
kKill 
kSendMessage 
kStop 

Definition at line 44 of file inspector_io.h.

◆ ws_decode_result

Enumerator
FRAME_OK 
FRAME_INCOMPLETE 
FRAME_CLOSE 
FRAME_ERROR 

Definition at line 24 of file inspector_socket.cc.

Function Documentation

◆ FormatWsAddress()

std::string FormatWsAddress ( const std::string &  host,
int  port,
const std::string &  target_id,
bool  include_protocol 
)

◆ inspector_accept()

int inspector_accept ( uv_stream_t *  server,
InspectorSocket socket,
handshake_cb  callback 
)

◆ inspector_close()

◆ inspector_from_stream() [1/3]

InspectorSocket* node::inspector::inspector_from_stream ( uv_tcp_t *  stream)
inline

◆ inspector_from_stream() [2/3]

InspectorSocket* node::inspector::inspector_from_stream ( uv_stream_t *  stream)
inline

Definition at line 90 of file inspector_socket.h.

References inspector_from_stream().

◆ inspector_from_stream() [3/3]

InspectorSocket* node::inspector::inspector_from_stream ( uv_handle_t *  stream)
inline

Definition at line 94 of file inspector_socket.h.

References inspector_from_stream().

◆ inspector_is_active()

bool inspector_is_active ( const InspectorSocket inspector)

Definition at line 614 of file inspector_socket.cc.

References InspectorSocket::shutting_down, and InspectorSocket::tcp.

◆ inspector_read_start()

int inspector_read_start ( InspectorSocket inspector,
uv_alloc_cb  alloc_cb,
uv_read_cb  read_cb 
)

◆ inspector_read_stop()

◆ inspector_write()

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().

◆ InterruptCallback()

void node::inspector::InterruptCallback ( v8::Isolate *  ,
void *  agent 
)

Definition at line 175 of file inspector_io.cc.

◆ Open()

void node::inspector::Open ( const FunctionCallbackInfo< Value > &  args)

Definition at line 872 of file inspector_agent.cc.

◆ Url()

void node::inspector::Url ( const FunctionCallbackInfo< Value > &  args)

Definition at line 894 of file inspector_agent.cc.

◆ Utf8ToStringView()

std::unique_ptr< v8_inspector::StringBuffer > Utf8ToStringView ( const std::string &  message)

Variable Documentation

◆ kEightBytePayloadLengthField

const size_t kEightBytePayloadLengthField = 127

Definition at line 135 of file inspector_socket.cc.

◆ kFinalBit

const unsigned char kFinalBit = 0x80

Definition at line 125 of file inspector_socket.cc.

◆ kMaskBit

const unsigned char kMaskBit = 0x80

Definition at line 130 of file inspector_socket.cc.

◆ kMaskingKeyWidthInBytes

const size_t kMaskingKeyWidthInBytes = 4

Definition at line 136 of file inspector_socket.cc.

◆ kMaxSingleBytePayloadLength

const size_t kMaxSingleBytePayloadLength = 125

Definition at line 133 of file inspector_socket.cc.

◆ kOpCodeBinary

const OpCode kOpCodeBinary = 0x2

Definition at line 120 of file inspector_socket.cc.

◆ kOpCodeClose

const OpCode kOpCodeClose = 0x8

Definition at line 121 of file inspector_socket.cc.

◆ kOpCodeContinuation

const OpCode kOpCodeContinuation = 0x0

Definition at line 118 of file inspector_socket.cc.

◆ kOpCodeMask

const unsigned char kOpCodeMask = 0xF

Definition at line 129 of file inspector_socket.cc.

◆ kOpCodePing

const OpCode kOpCodePing = 0x9

Definition at line 122 of file inspector_socket.cc.

◆ kOpCodePong

const OpCode kOpCodePong = 0xA

Definition at line 123 of file inspector_socket.cc.

◆ kOpCodeText

const OpCode kOpCodeText = 0x1

Definition at line 119 of file inspector_socket.cc.

◆ kPayloadLengthMask

const unsigned char kPayloadLengthMask = 0x7F

Definition at line 131 of file inspector_socket.cc.

◆ kReserved1Bit

const unsigned char kReserved1Bit = 0x40

Definition at line 126 of file inspector_socket.cc.

◆ kReserved2Bit

const unsigned char kReserved2Bit = 0x20

Definition at line 127 of file inspector_socket.cc.

◆ kReserved3Bit

const unsigned char kReserved3Bit = 0x10

Definition at line 128 of file inspector_socket.cc.

◆ kTwoBytePayloadLengthField

const size_t kTwoBytePayloadLengthField = 126

Definition at line 134 of file inspector_socket.cc.