Actix websocket back pressure

I hope there are Actix maintainers here who could answer this question. I have got an Actix server which sends data to clients via a websocket. As far as I can see a server can cause infinite outgoing buffer queue growth. Sending either text or binary via websocket context does not provide a mechanism to handle the cases of the outgoing buffer overflow or other errors. Is it by design? How can I know if a server exhausted outgoing buffer on the TCP level sending many websocket messages to a client?

impl<A> WebsocketContext<A>
    A: Actor<Context = Self>,
    /// Write payload
    /// This is a low-level function that accepts framed messages that should
    /// be created using `Frame::message()`. If you want to send text or binary
    /// data you should prefer the `text()` or `binary()` convenience functions
    /// that handle the framing for you.
    pub fn write_raw(&mut self, msg: Message) {

    /// Send text frame
    pub fn text<T: Into<String>>(&mut self, text: T) {

    /// Send binary frame
    pub fn binary<B: Into<Bytes>>(&mut self, data: B) {

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.