HubContextValue
interfaceHub connection context value provided to consumers.
This is the shape of the value exposed by
HubContext and consumed
via useHubConnection. It contains methods for sending messages,
subscribing to incoming messages, and controlling the connection lifecycle.Properties
| Name | Type | Description |
|---|---|---|
disconnect | () => void | Manually disconnect from the hub and cancel auto-reconnect. |
extensionId | string | This panel's identity, as given to the hub at handshake. |
reconnect | () => void | Reset reconnect attempts and establish a fresh connection. |
send | (message: DevtoolsMessage) => void | Send a protocol message to the hub. |
status | HubConnectionStatus | Current connection status. |
subscribe | (handler: (message: DevtoolsMessage) => void) => () => void | Subscribe to incoming hub messages. |