mirror of
https://github.com/fafhrd91/actix-web
synced 2024-11-30 10:42:55 +01:00
Added ws::Message::Nop, no-op websockets message
This commit is contained in:
parent
c126713f40
commit
3220777ff9
@ -1,6 +1,10 @@
|
||||
# Changes
|
||||
|
||||
## [0.1.0-alpha.2] - 2019-xx-xx
|
||||
## [0.1.0-alpha.2] - 2019-03-29
|
||||
|
||||
### Added
|
||||
|
||||
* Added ws::Message::Nop, no-op websockets message
|
||||
|
||||
### Changed
|
||||
|
||||
|
@ -18,6 +18,8 @@ pub enum Message {
|
||||
Pong(String),
|
||||
/// Close message with optional reason
|
||||
Close(Option<CloseReason>),
|
||||
/// No-op. Useful for actix-net services
|
||||
Nop,
|
||||
}
|
||||
|
||||
/// `WebSocket` frame
|
||||
@ -87,6 +89,7 @@ impl Encoder for Codec {
|
||||
Parser::write_message(dst, txt, OpCode::Pong, true, !self.server)
|
||||
}
|
||||
Message::Close(reason) => Parser::write_close(dst, reason, !self.server),
|
||||
Message::Nop => (),
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user