Creates a new RawSocket instance that wraps ZMQ channels in a WebSocket-like interface. Initializes kernel communication channels (shell, control, stdin, iopub).
Kernel connection configuration from the connection file.
Function to serialize kernel messages to string or ArrayBuffer format.
Callback invoked when the socket connection closes. Signature: (event: { wasClean: boolean; code: number; reason: string; target: unknown }) => void.
Callback invoked when a socket error occurs. Signature: (event: { error: unknown; message: string; type: string; target: unknown }) => void.
Callback invoked when a message is received from the kernel. Signature: (event: { data: WebSocketWS.Data; type: string; target: unknown }) => void.
Callback invoked when the socket connection opens. Signature: (event: { target: unknown }) => void.
ReadonlyprotocolWebSocket protocol version string. Empty for raw ZMQ sockets, matches WebSocket interface.
Register a hook to intercept incoming kernel messages.
Async function called with serialized message data.
Register a hook to intercept outgoing kernel messages.
Async function called before message is sent.
Close all ZMQ channels and mark the socket as closed.
Dispose the socket, closing all channels if not already closed.
Emit an event by invoking the corresponding callback handler.
Event name (message, close, error, or open).
Event arguments passed to the handler.
Always true.
Remove a previously registered receive hook.
Hook function to remove from the receive chain.
Remove a previously registered send hook.
Hook function to remove from the send chain.
Send a kernel message through the appropriate ZMQ channel.
Kernel message to send.
Unused callback parameter for WebSocket API compatibility.
Raw ZMQ socket that wraps kernel channels in WebSocket-like interface. Used by @jupyterlab/services for kernel communication.