Skip to main content

Module ws

Module ws 

Source
Available on crate feature websocket only.
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§

clicli

Structs§

BotBuilder
Client
A high level SimpleX-Chat client which provides typed API methods with automatic command serialization and response deserialization.
SimplexVersion
Parses SimpleX version numbers in the form MAJOR.MINOR.PATCH.HOTFIX.

Enums§

BotInitError
Error returned by BotBuilder::connect and BotBuilder::launch.
ClientError
See crate::client_api::AllowUndocumentedResponses if 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 )
ConnectError
EventShape
VersionError
WsError
Possible WebSocket errors.

Functions§

connect
Connects to a simplex-chat WebSocket server, returning a Client and an EventStream that handle serialization/deserialization of commands and events.
retry_connect
Like connect but retries to connect retries_count times before returning an error. This method is needed when you run simplex-cli programmatically and don’t know when WebSocket port becomes available.

Type Aliases§

Botxftp
ClientResult
CoreError
CoreEvent
CoreResult
EventStream