old backend core lib
This commit is contained in:
+20
-6
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user