Skip to content
Snippets Groups Projects

Close Connection

Open Louis requested to merge feature/CloseConnection into main
1 file
+ 8
0
Compare changes
  • Side-by-side
  • Inline
+ 8
0
@@ -203,6 +203,10 @@ impl PollingClient {
@@ -203,6 +203,10 @@ impl PollingClient {
pub fn send_binary(&self, message: Vec<u8>) -> Result<(), JsValue> {
pub fn send_binary(&self, message: Vec<u8>) -> Result<(), JsValue> {
self.event_client.send_binary(message)
self.event_client.send_binary(message)
}
}
 
 
pub fn close(&self) -> Result<(), JsValue> {
 
self.event_client.close()
 
}
}
}
#[derive(Debug, Clone, Error)]
#[derive(Debug, Clone, Error)]
@@ -435,4 +439,8 @@ impl EventClient {
@@ -435,4 +439,8 @@ impl EventClient {
.borrow()
.borrow()
.send_with_u8_array(message.as_slice())
.send_with_u8_array(message.as_slice())
}
}
 
 
pub fn close(&self) -> Result<(), JsValue> {
 
self.connection.borrow().close()
 
}
}
}
Loading