Skip to content

API reference / @jsprismarine/script-host / debugger/channel / PortDebuggerChannel

Class: PortDebuggerChannel ​

Defined in: script-host/src/debugger/channel.ts:46

The engine thread's end: a DebuggerChannel whose receive blocks the thread until the connection's side delivers a message or closes.

Implements ​

Constructors ​

Constructor ​

new PortDebuggerChannel(endpoint): PortDebuggerChannel

Defined in: script-host/src/debugger/channel.ts:50

Parameters ​

endpoint ​

DebuggerChannelEndpoint

Returns ​

PortDebuggerChannel

Accessors ​

closed ​

Get Signature ​

get closed(): boolean

Defined in: script-host/src/debugger/channel.ts:56

Whether the connection's side has closed. Messages it delivered before closing still arrive.

Returns ​

boolean

Whether the connection has closed. receive and poll still return the messages that arrived before it closed.

Implementation of ​

DebuggerChannel.closed

Methods ​

close() ​

close(): void

Defined in: script-host/src/debugger/channel.ts:82

Closes this end, which also tells the connection's side.

Returns ​

void


poll() ​

poll(): unknown

Defined in: script-host/src/debugger/channel.ts:77

Returns a message that has already arrived, or undefined, without waiting.

Returns ​

unknown

Implementation of ​

DebuggerChannel.poll


receive() ​

receive(): unknown

Defined in: script-host/src/debugger/channel.ts:66

Returns the next message, blocking this thread until one arrives; undefined once the connection has closed.

Returns ​

unknown

Implementation of ​

DebuggerChannel.receive


send() ​

send(message): void

Defined in: script-host/src/debugger/channel.ts:61

Posts a message to the connection's side; dropped once it has closed.

Parameters ​

message ​

HostMessage

Returns ​

void

Implementation of ​

DebuggerChannel.send