McpWebSocketClientTransport class
A WebSocket transport for MCP clients
- Inheritance
-
- Object
- McpTransport
- McpClientTransport
- McpWebSocketClientTransport
Constructors
- McpWebSocketClientTransport(Uri _uri)
- Create a new WebSocket client transport
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isConnected → bool
-
Whether the transport is connected
no setteroverride
-
notifications
→ Stream<
McpNotification> -
Stream of incoming notifications
no setteroverride
-
requests
→ Stream<
McpRequest> -
Stream of incoming requests
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- serverCapabilities → ServerCapabilities?
-
The server capabilities
no setteroverride
Methods
-
connect(
) → Future< void> -
Connect the transport
override
-
disconnect(
) → Future< void> -
Disconnect the transport
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
sendNotification(
McpNotification notification) → Future< void> -
Send a notification
override
-
sendRequest(
McpRequest request) → Future< McpResponse> -
Send a request and wait for a response
override
-
sendResponse(
McpResponse response) → Future< void> -
Send a response to a request
override
-
setServerCapabilities(
ServerCapabilities capabilities) → void - Set the server capabilities
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited