ó
[³XMc           @   s÷   d  Z  d d l Z d d l Z d d l m Z d d l m Z m Z d e j f d „  ƒ  YZ	 d e j f d „  ƒ  YZ
 d	 e j f d
 „  ƒ  YZ d e j f d „  ƒ  YZ d e j f d „  ƒ  YZ d e j f d „  ƒ  YZ d e j f d „  ƒ  YZ d S(   sz   Implement standard (and unused) TCP protocols.

These protocols are either provided by inetd, or are not provided at all.
iÿÿÿÿN(   t
   implements(   t   protocolt
   interfacest   Echoc           B   s   e  Z d  Z d „  Z RS(   s8   As soon as any data is received, write it back (RFC 862)c         C   s   |  j  j | ƒ d  S(   N(   t	   transportt   write(   t   selft   data(    (    s:   /usr/lib/python2.7/dist-packages/twisted/protocols/wire.pyt   dataReceived   s    (   t   __name__t
   __module__t   __doc__R   (    (    (    s:   /usr/lib/python2.7/dist-packages/twisted/protocols/wire.pyR      s   t   Discardc           B   s   e  Z d  Z d „  Z RS(   s#   Discard any received data (RFC 863)c         C   s   d  S(   N(    (   R   R   (    (    s:   /usr/lib/python2.7/dist-packages/twisted/protocols/wire.pyR      s    (   R	   R
   R   R   (    (    (    s:   /usr/lib/python2.7/dist-packages/twisted/protocols/wire.pyR      s   t   Chargenc           B   sE   e  Z d  Z d Z e e j ƒ d „  Z d „  Z d „  Z	 d „  Z
 RS(   s"   Generate repeating noise (RFC 864)sG   @ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ !"#$%&?c         C   s   |  j  j |  d ƒ d  S(   Ni    (   R   t   registerProducer(   R   (    (    s:   /usr/lib/python2.7/dist-packages/twisted/protocols/wire.pyt   connectionMade&   s    c         C   s   |  j  j |  j ƒ d  S(   N(   R   R   t   noise(   R   (    (    s:   /usr/lib/python2.7/dist-packages/twisted/protocols/wire.pyt   resumeProducing)   s    c         C   s   d  S(   N(    (   R   (    (    s:   /usr/lib/python2.7/dist-packages/twisted/protocols/wire.pyt   pauseProducing,   s    c         C   s   d  S(   N(    (   R   (    (    s:   /usr/lib/python2.7/dist-packages/twisted/protocols/wire.pyt   stopProducing/   s    (   R	   R
   R   R   R    R   t	   IProducerR   R   R   R   (    (    (    s:   /usr/lib/python2.7/dist-packages/twisted/protocols/wire.pyR       s   			t   QOTDc           B   s    e  Z d  Z d „  Z d „  Z RS(   s#   Return a quote of the day (RFC 865)c         C   s'   |  j  j |  j ƒ  ƒ |  j  j ƒ  d  S(   N(   R   R   t   getQuotet   loseConnection(   R   (    (    s:   /usr/lib/python2.7/dist-packages/twisted/protocols/wire.pyR   6   s    c         C   s   d S(   s0   Return a quote. May be overrriden in subclasses.s'   An apple a day keeps the doctor away.
(    (   R   (    (    s:   /usr/lib/python2.7/dist-packages/twisted/protocols/wire.pyR   :   s    (   R	   R
   R   R   R   (    (    (    s:   /usr/lib/python2.7/dist-packages/twisted/protocols/wire.pyR   3   s   	t   Whoc           B   s    e  Z d  Z d „  Z d „  Z RS(   s%   Return list of active users (RFC 866)c         C   s'   |  j  j |  j ƒ  ƒ |  j  j ƒ  d  S(   N(   R   R   t   getUsersR   (   R   (    (    s:   /usr/lib/python2.7/dist-packages/twisted/protocols/wire.pyR   A   s    c         C   s   d S(   s,   Return active users. Override in subclasses.s   root
(    (   R   (    (    s:   /usr/lib/python2.7/dist-packages/twisted/protocols/wire.pyR   E   s    (   R	   R
   R   R   R   (    (    (    s:   /usr/lib/python2.7/dist-packages/twisted/protocols/wire.pyR   >   s   	t   Daytimec           B   s   e  Z d  Z d „  Z RS(   s-   Send back the daytime in ASCII form (RFC 867)c         C   s=   |  j  j t j t j t j ƒ  ƒ ƒ d ƒ |  j  j ƒ  d  S(   Ns   
(   R   R   t   timet   asctimet   gmtimeR   (   R   (    (    s:   /usr/lib/python2.7/dist-packages/twisted/protocols/wire.pyR   M   s    ,(   R	   R
   R   R   (    (    (    s:   /usr/lib/python2.7/dist-packages/twisted/protocols/wire.pyR   J   s   t   Timec           B   s   e  Z d  Z d „  Z RS(   s5   Send back the time in machine readable form (RFC 868)c         C   s?   t  j d t t j ƒ  ƒ ƒ } |  j j | ƒ |  j j ƒ  d  S(   Ns   !i(   t   structt   packt   intR   R   R   R   (   R   t   result(    (    s:   /usr/lib/python2.7/dist-packages/twisted/protocols/wire.pyR   U   s    (   R	   R
   R   R   (    (    (    s:   /usr/lib/python2.7/dist-packages/twisted/protocols/wire.pyR   R   s   (   R   R   R   t   zope.interfaceR    t   twisted.internetR   R   t   ProtocolR   R   R   R   R   R   R   (    (    (    s:   /usr/lib/python2.7/dist-packages/twisted/protocols/wire.pyt   <module>   s   