pub struct WebSocketClientTransport { /* private fields */ }
Expand description
WebSocket transport for MCP clients
This transport communicates with an MCP server via WebSocket connections, providing bidirectional real-time communication for both requests and notifications.
Implementations§
Source§impl WebSocketClientTransport
impl WebSocketClientTransport
Trait Implementations§
Source§impl Transport for WebSocketClientTransport
impl Transport for WebSocketClientTransport
Source§fn send_request<'life0, 'async_trait>(
&'life0 mut self,
request: JsonRpcRequest,
) -> Pin<Box<dyn Future<Output = McpResult<JsonRpcResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send_request<'life0, 'async_trait>(
&'life0 mut self,
request: JsonRpcRequest,
) -> Pin<Box<dyn Future<Output = McpResult<JsonRpcResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Send a JSON-RPC request and wait for a response Read more
Source§fn send_notification<'life0, 'async_trait>(
&'life0 mut self,
notification: JsonRpcNotification,
) -> Pin<Box<dyn Future<Output = McpResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send_notification<'life0, 'async_trait>(
&'life0 mut self,
notification: JsonRpcNotification,
) -> Pin<Box<dyn Future<Output = McpResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Send a JSON-RPC notification (no response expected) Read more
Source§fn receive_notification<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = McpResult<Option<JsonRpcNotification>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn receive_notification<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = McpResult<Option<JsonRpcNotification>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Receive a notification from the server (non-blocking) Read more
Source§fn close<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = McpResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn close<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = McpResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Close the transport connection Read more
Source§fn is_connected(&self) -> bool
fn is_connected(&self) -> bool
Check if the transport is connected Read more
Source§fn connection_info(&self) -> String
fn connection_info(&self) -> String
Get connection information for debugging Read more
Auto Trait Implementations§
impl !Freeze for WebSocketClientTransport
impl !RefUnwindSafe for WebSocketClientTransport
impl Send for WebSocketClientTransport
impl Sync for WebSocketClientTransport
impl Unpin for WebSocketClientTransport
impl !UnwindSafe for WebSocketClientTransport
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more