old backend core lib

This commit is contained in:
2026-07-18 11:44:58 -07:00
parent 994854d104
commit f599672a30
36 changed files with 3776 additions and 276 deletions
+20 -6
View File
@@ -59,15 +59,29 @@ impl BiliLiveClient {
})
}
pub fn send_auth(&mut self) {
if let Err(e) = self.send_auth_internal() {
log::error!("failed to send auth packet: {}", e);
/// Send authentication, including the built-in reconnect fallback.
///
/// The boolean lets embedding applications rebuild the whole client when
/// all socket-level recovery attempts fail. Existing CLI callers may
/// safely ignore it.
pub fn send_auth(&mut self) -> bool {
match self.send_auth_internal() {
Ok(()) => true,
Err(e) => {
log::error!("failed to send auth packet: {}", e);
false
}
}
}
pub fn send_heart_beat(&mut self) {
if let Err(e) = self.send_heart_beat_internal() {
log::error!("failed to send heartbeat: {}", e);
/// Send a heartbeat and report whether socket-level recovery succeeded.
pub fn send_heart_beat(&mut self) -> bool {
match self.send_heart_beat_internal() {
Ok(()) => true,
Err(e) => {
log::error!("failed to send heartbeat: {}", e);
false
}
}
}