aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorLibravatar daniloaz <daniloaz@gmail.com>2024-04-13 21:24:12 +0200
committerLibravatar daniloaz <daniloaz@gmail.com>2024-04-13 21:24:12 +0200
commit65282048aefecda06f937ed670755b64b19ce9b1 (patch)
tree1a026ad96955820ab72b02dba79c3c3b8662cacd /README.md
parent5af8a69942aeed85b5cd2bd84cb5f33169834690 (diff)
⬆️ (Cargo.toml): Bump lightstreamer-client version from 0.1.8 to 0.1.9
✨ (Cargo.toml): Add colored dependency to enhance console output 📝 (README.md): Overhaul documentation to provide comprehensive details about the project, its features, usage, and contribution guidelines 💡 (client_listener.rs, client_message_listener.rs): Add newline at end of file to adhere to POSIX standards ♻️ (connection_options.rs): Refactor code to improve readability and maintainability 🐛 (connection_options.rs): Rename 'reduce_head' to '_reduce_head' to indicate unused variable ♻️ (error.rs): Reorder imports and adjust formatting for consistency ♻️ (item_update.rs): Refactor code to improve readability and maintainability ♻️ (lib.rs): Reorder module imports for better organization ♻️ (ls_client.rs): Refactor code to improve readability and maintainability 💡 (main.rs): Update print statements to use colored output for changed fields 🐛 (main.rs): Fix import order to follow Rust's idiomatic style 🐛 (proxy.rs, subscription.rs, subscription_listener.rs): Add newline at end of file to follow POSIX standard ♻️ (subscription.rs, subscription_listener.rs): Refactor code to improve readability and maintainability 📝 (util.rs): Add newline at end of file to adhere to POSIX standards
Diffstat (limited to 'README.md')
-rw-r--r--README.md77
1 files changed, 75 insertions, 2 deletions
diff --git a/README.md b/README.md
index 793c45e..ec149c4 100644
--- a/README.md
+++ b/README.md
@@ -1,2 +1,75 @@
-# lightstreamer-client
-Lightstreamer client for Rust
+# Lightstreamer Rust Client SDK
+
+This project is a partial implementation of the Lightstreamer TLCP (Text-based Live Connections Protocol) in Rust. It provides a client SDK to interact with Lightstreamer servers, focused on supporting the specific needs of the [ig_trading_api](https://github.com/daniloaz/ig_trading_api) project.
+
+## Features
+
+- Full-duplex WebSocket-based connection mode.
+- Subscriptions to items and item groups.
+- MERGE subscription mode.
+- Listening to connection events and messages.
+- Configuration of connection options and connection details.
+- Subscription lifecycle management.
+- Retrieval of real-time item updates.
+
+Please note that this SDK currently does not support all the features and capabilities of the full Lightstreamer protocol. It has been developed to cover the requirements of the ig_trading_api project mentioned above. Features like other connection modes, subscription modes (DISTINCT, RAW, COMMAND), and some other advanced options are not implemented at this time.
+
+## Installation
+
+To use this SDK in your Rust project, add the following dependency to your `Cargo.toml`:
+
+```toml
+[dependencies]
+lightstreamer-client = "0.1.9"
+```
+
+## Usage
+
+Here's a minimal example of how to use the Lightstreamer Rust Client SDK:
+
+```rust
+use lightstreamer_client::ls_client::LightstreamerClient;
+use lightstreamer_client::subscription::{Subscription, SubscriptionMode};
+
+#[tokio::main]
+async fn main() {
+ // Create a Lightstreamer client
+ let client = LightstreamerClient::new(
+ Some("http://push.lightstreamer.com/lightstreamer"), // Lightstreamer server
+ Some("DEMO"), // adapter set
+ None, // username
+ None, // password
+ ).unwrap();
+
+ // Create a subscription
+ let mut subscription = Subscription::new(
+ SubscriptionMode::Merge,
+ Some(vec!["item1".to_string(), "item2".to_string()]),
+ Some(vec!["field1".to_string(), "field2".to_string()]),
+ ).unwrap();
+
+ // Subscribe and connect
+ client.subscribe(subscription);
+ client.connect(None).await.unwrap();
+}
+```
+
+For a more advanced example of how to use the SDK to subscribe to item updates, refer to the main.rs file in the project source code. It demonstrates creating a Lightstreamer client, setting up subscriptions, handling item updates, and managing the connection lifecycle with a configurable number of connection attempts.
+
+For more details on using the SDK, please refer to the reference documentation.
+
+## Documentation
+
+The full SDK documentation is available at [docs.rs](https://docs.rs/lightstreamer-client).
+
+## Project Structure
+
+Although this SDK does not provide a complete implementation of the Lightstreamer protocol, it has been built with a solid structure and scaffolding, similar to the official Lightstreamer libraries. The code is documented, and the project is designed to facilitate contributions from the community to add support for missing features.
+
+## License
+
+This project is licensed under the GPL-3.0 License. See the [LICENSE](LICENSE) file for details.
+
+## Contributing
+
+Contributions are welcome. Please open an issue or submit a pull request to propose changes and help complete the SDK with additional Lightstreamer features. \ No newline at end of file