mirror of
https://github.com/fafhrd91/actix-web
synced 2025-08-31 00:50:20 +02:00
ws/context: Increase write()
visibility to public (#402)
This type is introduced to avoid confusion between the `.binary()` and `.write_raw()` methods on WebSocket contexts
This commit is contained in:
@@ -27,7 +27,7 @@ use client::{
|
||||
Pipeline, SendRequest, SendRequestError,
|
||||
};
|
||||
|
||||
use super::frame::Frame;
|
||||
use super::frame::{Frame, FramedMessage};
|
||||
use super::proto::{CloseReason, OpCode};
|
||||
use super::{Message, ProtocolError, WsWriter};
|
||||
|
||||
@@ -529,10 +529,10 @@ pub struct ClientWriter {
|
||||
impl ClientWriter {
|
||||
/// Write payload
|
||||
#[inline]
|
||||
fn write(&mut self, mut data: Binary) {
|
||||
fn write(&mut self, mut data: FramedMessage) {
|
||||
let inner = self.inner.borrow_mut();
|
||||
if !inner.closed {
|
||||
let _ = inner.tx.unbounded_send(data.take());
|
||||
let _ = inner.tx.unbounded_send(data.0.take());
|
||||
} else {
|
||||
warn!("Trying to write to disconnected response");
|
||||
}
|
||||
|
Reference in New Issue
Block a user