Classes | Functions | Variables
tornado::iostream Namespace Reference

Classes

class  IOStream
class  SSLIOStream

Functions

def _double_prefix
def _merge_prefix
def doctests

Variables

 ssl = None

Function Documentation

def tornado.iostream._double_prefix (   deque) [private]
Grow by doubling, but don't split the second chunk just because the
first one is small.

Definition at line 715 of file iostream.py.

def tornado.iostream._merge_prefix (   deque,
  size 
) [private]
Replace the first entries in a deque of strings with a single
string of up to size bytes.

>>> d = collections.deque(['abc', 'de', 'fghi', 'j'])
>>> _merge_prefix(d, 5); print d
deque(['abcde', 'fghi', 'j'])

Strings will be split as necessary to reach the desired size.
>>> _merge_prefix(d, 7); print d
deque(['abcdefg', 'hi', 'j'])

>>> _merge_prefix(d, 3); print d
deque(['abc', 'defg', 'hi', 'j'])

>>> _merge_prefix(d, 100); print d
deque(['abcdefghij'])

Definition at line 724 of file iostream.py.

Definition at line 762 of file iostream.py.


Variable Documentation

Definition at line 36 of file iostream.py.



roswww
Author(s): Jonathan Mace
autogenerated on Thu Jan 2 2014 11:53:30