Public Member Functions | Private Attributes | List of all members
rosbridge_server.autobahn_websocket.OutgoingValve Class Reference

Public Member Functions

def __init__ (self, proto)
 
def pauseProducing (self)
 
def relay (self, message, compression="none")
 
def resumeProducing (self)
 
def stopProducing (self)
 

Private Attributes

 _finished
 
 _proto
 
 _valve
 

Detailed Description

Allows the Autobahn transport to pause outgoing messages from rosbridge.

The purpose of this valve is to connect backpressure from the WebSocket client
back to the rosbridge protocol, which depends on backpressure for queueing.
Without this flow control, rosbridge will happily keep writing messages to
the WebSocket until the system runs out of memory.

This valve is closed and opened automatically by the Twisted TCP server.
In practice, Twisted should only close the valve when its userspace write buffer
is full and it should only open the valve when that buffer is empty.

When the valve is closed, the rosbridge protocol instance's outgoing writes
must block until the valve is opened.

Definition at line 115 of file autobahn_websocket.py.

Constructor & Destructor Documentation

◆ __init__()

def rosbridge_server.autobahn_websocket.OutgoingValve.__init__ (   self,
  proto 
)

Definition at line 130 of file autobahn_websocket.py.

Member Function Documentation

◆ pauseProducing()

def rosbridge_server.autobahn_websocket.OutgoingValve.pauseProducing (   self)

Definition at line 142 of file autobahn_websocket.py.

◆ relay()

def rosbridge_server.autobahn_websocket.OutgoingValve.relay (   self,
  message,
  compression = "none" 
)

Definition at line 136 of file autobahn_websocket.py.

◆ resumeProducing()

def rosbridge_server.autobahn_websocket.OutgoingValve.resumeProducing (   self)

Definition at line 146 of file autobahn_websocket.py.

◆ stopProducing()

def rosbridge_server.autobahn_websocket.OutgoingValve.stopProducing (   self)

Definition at line 149 of file autobahn_websocket.py.

Member Data Documentation

◆ _finished

rosbridge_server.autobahn_websocket.OutgoingValve._finished
private

Definition at line 133 of file autobahn_websocket.py.

◆ _proto

rosbridge_server.autobahn_websocket.OutgoingValve._proto
private

Definition at line 131 of file autobahn_websocket.py.

◆ _valve

rosbridge_server.autobahn_websocket.OutgoingValve._valve
private

Definition at line 132 of file autobahn_websocket.py.


The documentation for this class was generated from the following file:


rosbridge_server
Author(s): Jonathan Mace
autogenerated on Tue Oct 3 2023 02:12:49