SRS Client
The SRS (Simple RTMP Server) Rust Client or srs-client is a Rust package that provides bindings for the main functionalities of the SRS server. It supports two modes of operation:
- As an HTTP client to interact with the SRS HTTP API
- For handling SRS HTTP callbacks
HTTP Client Mode
In this mode, srs-client uses HTTP to communicate with the server based on the SRS HTTP API specification.
Usage
To use srs-client as an HTTP client:
use ;
use env;
async
HTTP Callback Mode
In this mode, srs-client provides structs to handle callbacks sent by SRS.
Usage
To handle SRS callbacks:
use ;
use ;
pub async
Features
-
HTTP Client Mode:
- Retrieve server information (version, vhosts, streams, clients)
- Monitor system stats (rusages, self_proc_stats, system_proc_stats, meminfos)
- Manage clients (kickoff)
-
HTTP Callback Mode:
- Handle various SRS events (OnConnect, OnPublish, etc.)
Full API Reference is available here.
Installation
Add this to your Cargo.toml:
[]
= "0.1.0"
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
For maintainers releasing new versions, see RELEASE.md for detailed release instructions.
License
This project is licensed under the MIT License.