Expand description
WebSocket backend that connects to a simplex-chat WebSocket server.
Use BotBuilder to launch or connect to simplex-chat and get a ready-to-use Bot.
For lower-level access, connect and retry_connect return a Client and an
EventStream directly.
Re-exports§
pub use simploxide_ws_core as core;
Modules§
Structs§
- BotBuilder
- Client
- A high level SimpleX-Chat client which provides typed API methods with automatic command serialization and response deserialization.
- Simplex
Version - Parses SimpleX version numbers in the form
MAJOR.MINOR.PATCH.HOTFIX.
Enums§
- BotInit
Error - Error returned by
BotBuilder::connectandBotBuilder::launch. - Client
Error - See
crate::client_api::AllowUndocumentedResponsesif you don’t want to trigger an error when you receive undocumeted responses(you usually receive undocumented responses when your simplex-chat server version is not compatible with the simploxide-client version. Keep an eye on the Version compatability table ) - Connect
Error - Event
Shape - Version
Error - WsError
- Possible WebSocket errors.
Functions§
- connect
- Connects to a
simplex-chatWebSocket server, returning aClientand anEventStreamthat handle serialization/deserialization of commands and events. - retry_
connect - Like
connectbut retries to connectretries_counttimes before returning an error. This method is needed when you run simplex-cli programmatically and don’t know when WebSocket port becomes available.