Skip to content

Commit

Permalink
12087 epytext tls transport (twisted#12088)
Browse files Browse the repository at this point in the history
fix docstring formatting
  • Loading branch information
glyph authored Jan 19, 2024
2 parents d827ff4 + e1cbedc commit a4ab53c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
Empty file.
17 changes: 9 additions & 8 deletions src/twisted/protocols/tls.py
Original file line number Diff line number Diff line change
Expand Up @@ -764,19 +764,20 @@ def _get_default_clock() -> IReactorTime:
class BufferingTLSTransport(TLSMemoryBIOProtocol):
"""
A TLS transport implemented by wrapping buffering around a
``TLSMemoryBIOProtocol``.
L{TLSMemoryBIOProtocol}.
Doing many small writes directly to a ``OpenSSL.SSL.Connection``, as
implemented in ``TLSMemoryBIOProtocol``, can add significant CPU and
Doing many small writes directly to a L{OpenSSL.SSL.Connection}, as
implemented in L{TLSMemoryBIOProtocol}, can add significant CPU and
bandwidth overhead. Thus, even when writing is possible, small writes will
get aggregated and written as a single write at the next reactor iteration.
"""

# Note: An implementation based on composition would be nicer, but there's
# close integration between ``ProtocolWrapper`` subclasses like
# ``TLSMemoryBIOProtocol`` and the corresponding factory. Composition broke
# things like ``TLSMemoryBIOFactory.protocols`` having the correct
# instances, whereas subclassing makes that work.
# Implementation Note: An implementation based on composition would be
# nicer, but there's close integration between L{ProtocolWrapper}
# subclasses like L{TLSMemoryBIOProtocol} and the corresponding factory. An
# attempt to implement this with broke things like
# L{TLSMemoryBIOFactory.protocols} having the correct instances, whereas
# subclassing makes that work.

def __init__(
self,
Expand Down

0 comments on commit a4ab53c

Please sign in to comment.