Skip to main content

Module queue

Module queue 

Source
Expand description

Queues for stream messages.

While these are technically “channels”, we call them “queues” to indicate that they’re mostly just dumb pipes. They do some tracking (memquota and size), but nothing else. The higher-level object is StreamReceiver which tracks SENDME and END messages. So the idea is that the “queue” (ex: StreamQueueReceiver) just holds data and the “channel” (ex: StreamReceiver) adds the Tor logic.

The main purpose of these types are so that we can count how many bytes of stream data are stored for the stream. Ideally we’d use a channel type that tracks and reports this as part of its implementation, but popular channel implementations don’t seem to do that.

Structs§

StreamQueueReceiver 🔒
The receiving end of a channel of incoming stream messages.
StreamQueueSender 🔒
The sending end of a channel of incoming stream messages.

Functions§

data_len 🔒
The length field of the message, or 0 if not a data message.
stream_queue 🔒
Create a new stream queue for incoming messages.

Type Aliases§

Spec 🔒
Alias for the memquota mpsc spec.