mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Make closing related code more clear and more correct
This commit is contained in:
parent
a640b9aaea
commit
d121958a17
3 changed files with 78 additions and 67 deletions
|
@ -178,14 +178,15 @@ pub enum MessageData {
|
|||
#[derive(Deserialize, Serialize)]
|
||||
pub enum WebSocketDomAction {
|
||||
SendMessage(MessageData),
|
||||
Close(u16, String),
|
||||
Close(Option<u16>, Option<String>),
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Serialize)]
|
||||
pub enum WebSocketNetworkEvent {
|
||||
ConnectionEstablished(header::Headers, Vec<String>),
|
||||
MessageReceived(MessageData),
|
||||
Close,
|
||||
Close(Option<u16>, String),
|
||||
Fail,
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Serialize)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue