feat: ✨ webrtc ice candidate handling
This commit is contained in:
parent
978f082146
commit
7bf876b87b
6 changed files with 174 additions and 284 deletions
|
@ -23,12 +23,15 @@ pub struct User {
|
|||
pub enum Error {
|
||||
InvalidSignalType(String),
|
||||
UnexpectedSignalType(SignalType),
|
||||
WebSocketInit,
|
||||
WebSocketInitialization,
|
||||
WebSocketAuth,
|
||||
WebSocketSend,
|
||||
WebSocketReceivedNothing,
|
||||
WebSocketReceiveQueueReset,
|
||||
WebSocketReceiveQueueLocked,
|
||||
WebRTCInitialization,
|
||||
ICECandidateChannelReceive(String),
|
||||
ICECandidateAdd,
|
||||
}
|
||||
|
||||
impl std::error::Error for Error {
|
||||
|
@ -48,12 +51,17 @@ impl Display for Error {
|
|||
write!(f, "Unexpected Signal Type: {}", signal_type)
|
||||
}
|
||||
|
||||
Error::WebSocketInit => write!(f, "WebSocket Initialization"),
|
||||
Error::WebSocketInitialization => write!(f, "WebSocket Initialization"),
|
||||
Error::WebSocketAuth => write!(f, "WebSocket Auth"),
|
||||
Error::WebSocketSend => write!(f, "WebSocket Send"),
|
||||
Error::WebSocketReceivedNothing => write!(f, "WebSocket Received Nothing"),
|
||||
Error::WebSocketReceiveQueueReset => write!(f, "WebSocket Receive Queue Reset"),
|
||||
Error::WebSocketReceiveQueueLocked => write!(f, "WebSocket Receive Queue Locked"),
|
||||
Error::WebRTCInitialization => write!(f, "WebRTC Initialization"),
|
||||
Error::ICECandidateChannelReceive(recv_error) => {
|
||||
write!(f, "ICE Candidate Channel Receive | {}", recv_error)
|
||||
}
|
||||
Error::ICECandidateAdd => write!(f, "ICE Candidate Add"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue