Yf^ @ s d Z d d d d d d d g Z d d l Z e e d
rO e j d d g d
d l m Z d
d l m Z d
d l m Z d
d l m Z d
d l m
Z
d
d l m Z d# Z
Gd d d e Z Gd d d e Z e
d d d d d e
d d Z e
d d d d d e
d d Z e e d
rze
d d d d e
d d Z e
d d d d e
d d Z Gd d d e j Z Gd d d e e j Z Gd! d d Z Gd" d d Z d S)$zStream-related things.StreamReaderStreamWriterStreamReaderProtocolopen_connectionstart_serverIncompleteReadErrorLimitOverrunError NZAF_UNIXopen_unix_connectionstart_unix_server )
coroutines)compat)events) protocols) coroutine)logger c s( e Z d Z d Z f d d Z S)r z
Incomplete read error. Attributes:
- partial: read bytes string before the end of stream was reached
- expected: total number of expected bytes (or None if unknown)
c s6 t j d t | | f | | _ | | _ d S)Nz-%d bytes read on a total of %r expected bytes)super__init__lenpartialexpected)selfr r ) __class__ 4/opt/alt/python35/lib64/python3.5/asyncio/streams.pyr s zIncompleteReadError.__init__)__name__
__module____qualname____doc__r r r )r r r s c s( e Z d Z d Z f d d Z S)r zReached the buffer limit while looking for a separator.
Attributes:
- consumed: total number of to be consumed bytes.
c s t j | | | _ d S)N)r r consumed)r messager! )r r r r - s zLimitOverrunError.__init__)r r r r r r r )r r r ' s looplimitc + s | d k r t j } t d | d | } t | d | | j f d d | | | Ed H\ } } t | | | } | | f S)a A wrapper for create_connection() returning a (reader, writer) pair.
The reader returned is a StreamReader instance; the writer is a
StreamWriter instance.
The arguments are all the usual arguments to create_connection()
except protocol_factory; most common are positional host and port,
with various optional keyword arguments following.
Additional optional keyword arguments are loop (to set the event loop
instance to use) and limit (to set the buffer limit passed to the
StreamReader).
(If you want to customize the StreamReader and/or
StreamReaderProtocol classes, just copy the code -- there's
really nothing special here except some convenience.)
Nr$ r# c s S)Nr r )protocolr r