1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-09-01 01:16:59 +02:00

refactor h1 stream polling

This commit is contained in:
Nikolay Kim
2018-02-09 22:26:48 -08:00
parent b4b5c78b51
commit 0c98775b51
5 changed files with 164 additions and 169 deletions

View File

@@ -139,8 +139,8 @@ impl<A, S> WebsocketContext<A, S> where A: Actor<Context=Self> {
/// Send text frame
#[inline]
pub fn text(&mut self, text: &str) {
self.write(Frame::message(Vec::from(text), OpCode::Text, true).generate(false));
pub fn text<T: Into<String>>(&mut self, text: T) {
self.write(Frame::message(text.into(), OpCode::Text, true).generate(false));
}
/// Send binary frame