diff --git a/src/ws/client.rs b/src/ws/client.rs index 780de03cc..92087efa5 100644 --- a/src/ws/client.rs +++ b/src/ws/client.rs @@ -521,19 +521,19 @@ impl ClientWriter { /// Send text frame #[inline] - fn text>(&mut self, text: T) { + pub fn text>(&mut self, text: T) { self.write(Frame::message(text.into(), OpCode::Text, true, true)); } /// Send binary frame #[inline] - fn binary>(&mut self, data: B) { + pub fn binary>(&mut self, data: B) { self.write(Frame::message(data, OpCode::Binary, true, true)); } /// Send ping frame #[inline] - fn ping(&mut self, message: &str) { + pub fn ping(&mut self, message: &str) { self.write(Frame::message( Vec::from(message), OpCode::Ping, @@ -544,7 +544,7 @@ impl ClientWriter { /// Send pong frame #[inline] - fn pong(&mut self, message: &str) { + pub fn pong(&mut self, message: &str) { self.write(Frame::message( Vec::from(message), OpCode::Pong, @@ -555,7 +555,7 @@ impl ClientWriter { /// Send close frame #[inline] - fn close(&mut self, reason: Option) { + pub fn close(&mut self, reason: Option) { self.write(Frame::close(reason, true)); } } diff --git a/src/ws/context.rs b/src/ws/context.rs index 36f73e99e..79c3aa356 100644 --- a/src/ws/context.rs +++ b/src/ws/context.rs @@ -151,19 +151,19 @@ where /// Send text frame #[inline] - fn text>(&mut self, text: T) { + pub fn text>(&mut self, text: T) { self.write(Frame::message(text.into(), OpCode::Text, true, false)); } /// Send binary frame #[inline] - fn binary>(&mut self, data: B) { + pub fn binary>(&mut self, data: B) { self.write(Frame::message(data, OpCode::Binary, true, false)); } /// Send ping frame #[inline] - fn ping(&mut self, message: &str) { + pub fn ping(&mut self, message: &str) { self.write(Frame::message( Vec::from(message), OpCode::Ping, @@ -174,7 +174,7 @@ where /// Send pong frame #[inline] - fn pong(&mut self, message: &str) { + pub fn pong(&mut self, message: &str) { self.write(Frame::message( Vec::from(message), OpCode::Pong, @@ -185,7 +185,7 @@ where /// Send close frame #[inline] - fn close(&mut self, reason: Option) { + pub fn close(&mut self, reason: Option) { self.write(Frame::close(reason, false)); }