• version-0.2.0 318ccaa88c

    version-0.2.0
    All checks were successful
    Release / release (push) Successful in 1m27s
    Stable

    eric released this 2026-11-08 07:21:39 +01:00 | 9 commits to main since this release

    • Device Structure: Refactored SsdpDevice to support UPnP 1.1 fields (config_id, device_type, location, server, notification_types). Removed get_notification_types in favor of accessor methods.

    • Server Headers: Added boot_id and en_tetes_11 functions in src/server.rs to generate UPnP 1.1 headers and calculate device IDs based on system uptime.

    • Announcements: Updated announcement intervals to random values between 7.5 and 15 minutes.

    • Stop Mechanism: Introduced a stop flag in SsdpClient to manage the event loop lifecycle.

    • Event Loop: Updated run_event_loop and lire_annonces to respect the stop signal. The main logic now runs the event loop in a dedicated thread and exits upon client.stop().

    • IPv4 Constraint: Explicitly documented IPv4-only constraints for network interfaces.

    • Address Construction: Refactored src/client.rs to use SocketAddr::from for address construction.

    • Multicast Interface: Clarified multicast interface handling behavior.

    • Bumped package version from 0.1.2 to 0.2.0.

    • Updated Rust edition to 2024 in Cargo.toml.

    • Library Docs: Revised module documentation in src/lib.rs regarding network interfaces, UPnP versions, server shutdown logic (byebye on destruction), client stop logic, and tracing levels.

    • API Specification: Added api/0.2.0.json and api/0.2.0.txt defining SsdpEvent, SsdpClient, SsdpDevice, SsdpServer, and constants such as MAX_AGE.

    • Metadata: Updated AGENTS.md and TODO.md to reflect naming conventions, non-exhaustive enum handling, and pending work for SsdpEvent::Update.

    • Updated tests/multicast.rs to use new accessor methods.

    • Added verification for UPnP 1.1 header emission in multicast scenarios (sequential handling on port 1900).

    < pub enum pmossdp::SsdpEvent
    > #[non_exhaustive] pub enum pmossdp::SsdpEvent
    < pub fn pmossdp::SsdpClient::run_event_loop<F>(&self, F) -> never where F: core::ops::function::FnMut(pmossdp::SsdpEvent) + core::marker::Send + 'static
    > pub fn pmossdp::SsdpClient::run_event_loop<F>(&self, F) where F: core::ops::function::FnMut(pmossdp::SsdpEvent)
    > pub fn pmossdp::SsdpClient::stop(&self)
    < pub pmossdp::SsdpDevice::device_type: alloc::string::String
    < pub pmossdp::SsdpDevice::location: alloc::string::String
    < pub pmossdp::SsdpDevice::notification_types: alloc::vec::Vec<alloc::string::String>
    < pub pmossdp::SsdpDevice::server: alloc::string::String
    < pub pmossdp::SsdpDevice::uuid: alloc::string::String
    < pub fn pmossdp::SsdpDevice::get_notification_types(&self) -> &[alloc::string::String]
    > pub fn pmossdp::SsdpDevice::config_id(&self) -> core::option::Option<u32>
    > pub fn pmossdp::SsdpDevice::device_type(&self) -> &str
    > pub fn pmossdp::SsdpDevice::location(&self) -> &str
    > pub fn pmossdp::SsdpDevice::notification_types(&self) -> &[alloc::string::String]
    > pub fn pmossdp::SsdpDevice::server(&self) -> &str
    > pub fn pmossdp::SsdpDevice::uuid(&self) -> &str
    > pub fn pmossdp::SsdpDevice::with_config_id(self, u32) -> Self
    > pub fn pmossdp::SsdpDevice::without_root_device(self) -> Self
    < pub const pmossdp::SSDP_MULTICAST_ADDR: &str
    > pub const pmossdp::SSDP_MULTICAST_ADDR: core::net::ip_addr::Ipv4Addr
    
    Downloads