Files
soulseek-rs-modded/soulseek-rs-lib/src/lib.rs
T
Michel de Graaf 886f1b7092 feat(protocol): interests, tickers, global room and cant-connect
Adds the server messages the client had no way to speak: user and room
search (42/120), room tickers (113-116), the global room feed (150-152),
interests and the recommendation queries built on them (51/52/54/56/57/
110/111/112/117/118), a keepalive ping (32), gifted privileges (123), a
password change (142) and multi-user private messages (149).

CantConnectToPeer (1001) closes a real gap in both directions: a dial the
server asked us to make now answers the waiting peer instead of falling
back to brokering the same unreachable link the other way, and an incoming
one ends the wait on downloads queued for that peer rather than letting
them sit until a timeout.
2026-09-09 16:19:40 +00:00

45 lines
1.7 KiB
Rust

// The README is the crate's front page, and `cargo test --doc` compiles every
// example in it, so a signature change cannot leave the advertised usage stale.
#![doc = include_str!("../README.md")]
// The public surface is the client, its types, the wire codec and the share
// index. The actors, dispatcher, peer plumbing and download store are how the
// client is built, not what a host programs against, so they stay inside the
// crate and a change to them is not a change to the library's API.
pub(crate) mod actor;
pub mod client;
pub(crate) mod dispatcher;
pub(crate) mod download_store;
pub mod error;
pub mod message;
pub(crate) mod peer;
pub mod shares;
pub mod types;
#[macro_use]
pub mod utils;
// Prelude module for commonly used items
pub mod prelude {
pub use crate::actor::server_actor::PeerAddress;
pub use crate::types::{
ClientVersion, DownloadStatus, File, Recommendation, RoomEvent,
RoomInfo, RoomTicker, Search, SearchResult, SimilarUser, Transfer,
UploadInfo, UploadStatus, UserInfo, UserInterests, UserPresence,
UserStats, UserStatus,
};
pub use crate::{debug, error, info, trace, warn};
}
// Re-export commonly used types
pub use actor::server_actor::{PeerAddress, UserMessage};
pub use client::{Client, ClientSettings};
pub use error::{Result, SoulseekRs};
pub use message::peer::{SharedDirectory, SharedFileEntry};
pub use peer::{ConnectionType, ParseConnectionTypeError};
pub use types::{
ClientVersion, DownloadStatus, File, Recommendation, RoomEvent, RoomInfo,
RoomTicker, Search, SearchResult, SessionLoss, SimilarUser, Transfer,
UploadInfo, UploadStatus, UserInfo, UserInterests, UserPresence, UserStats,
UserStatus,
};