Skip to main content

Module conn

Module conn 

Source
Expand description

A rate limited async duplex connection.

An AsyncRead and AsyncWrite wrapper that rate limits both directions of a single bidirectional byte stream such as a TCP or TLS connection, by acquiring bandwidth from a super::BandwidthAcquirer given for each diection (read and write). One byte is one token.

Structsยง

GlobalRateLimitedConn
An AsyncRead and AsyncWrite wrapper that rate limits each direction of a single bidirectional byte stream.