1
0
Fork 0
mirror of https://github.com/librespot-org/librespot.git synced 2025-10-04 18:29:45 +02:00

Add basic websocket support

This commit is contained in:
johannesd3 2021-05-22 19:05:13 +02:00
parent 08ba3ad7d7
commit 1ade02b7ad
No known key found for this signature in database
GPG key ID: 8C2739E91D410F75
11 changed files with 1040 additions and 68 deletions

View file

@ -14,25 +14,30 @@ pub mod cache;
pub mod channel;
pub mod config;
mod connection;
#[allow(dead_code)]
mod dealer;
#[doc(hidden)]
pub mod diffie_hellman;
pub mod keymaster;
pub mod mercury;
mod proxytunnel;
pub mod session;
mod socket;
pub mod spotify_id;
#[doc(hidden)]
pub mod util;
pub mod version;
const AP_FALLBACK: &str = "ap.spotify.com:443";
fn ap_fallback() -> (String, u16) {
(String::from("ap.spotify.com"), 443)
}
#[cfg(feature = "apresolve")]
mod apresolve;
#[cfg(not(feature = "apresolve"))]
mod apresolve {
pub async fn apresolve(_: Option<&url::Url>, _: Option<u16>) -> String {
return super::AP_FALLBACK.into();
pub async fn apresolve(_: Option<&url::Url>, _: Option<u16>) -> (String, u16) {
super::ap_fallback()
}
}