ExMCP.Client.StateMachine (ex_mcp v0.9.2)
View SourceGenStateMachine implementation for ExMCP.Client.
This module formalizes the client's state transitions and reduces complexity by using state-specific data structures instead of a single monolithic state.
States
:disconnected- No active connection:connecting- Transport connection being established:handshaking- MCP protocol handshake in progress:ready- Connected and ready to handle requests:reconnecting- Connection lost, attempting to reconnect
State Transitions
disconnected -> connecting -> handshaking -> ready
^ |
| |
+---------- reconnecting <---------------+
Summary
Functions
Returns a specification to start this module under a supervisor.
Initiates connection to the MCP server.
Disconnects from the MCP server.
Gets the internal state of the client (for adapter use).
Gets the current state of the client.
Sends a request to the MCP server.
Starts a new client state machine.
Types
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
Initiates connection to the MCP server.
Disconnects from the MCP server.
Gets the internal state of the client (for adapter use).
Gets the current state of the client.
Sends a request to the MCP server.
Starts a new client state machine.