%PDF- %PDF-
| Direktori : /usr/lib/python2.7/site-packages/salt/netapi/rest_cherrypy/tools/ |
| Current File : //usr/lib/python2.7/site-packages/salt/netapi/rest_cherrypy/tools/websockets.pyo |
�
���^c @@ s� d d l m Z m Z m Z y6 d d l Z d d l m Z m Z d d l m Z Wn e
k
rh � n Xe � e j _ e e j
� j � d e f d � � YZ d S( i ( t absolute_importt print_functiont unicode_literalsN( t WebSocketPlugint
WebSocketTool( t WebSockett SynchronizingWebsocketc B@ s e Z d Z d � Z d � Z RS( u�
Class to handle requests sent to this websocket connection.
Each instance of this class represents a Salt websocket connection.
Waits to receive a ``ready`` message from the client.
Calls send on it's end of the pipe to signal to the sender on receipt
of ``ready``.
This class also kicks off initial information probing jobs when clients
initially connect. These jobs help gather information about minions, jobs,
and documentation.
c O@ s8 t t | � j | | � d | _ d | _ d | _ d S( N( t superR t __init__t Nonet pipet tokent opts( t selft argst kwargs( ( sN /usr/lib/python2.7/site-packages/salt/netapi/rest_cherrypy/tools/websockets.pyR s c C@ s? | j j d � d k r+ | j j | � n | j d t � d S( u�
Checks if the client has sent a ready message.
A ready message causes ``send()`` to be called on the
``parent end`` of the pipe.
Clients need to ensure that the pipe assigned to ``self.pipe`` is
the ``parent end`` of a pipe.
This ensures completion of the underlying websocket connection
and can be used to synchronize parallel senders.
u utf-8u websocket client readyu server received messageN( t datat decodeR
t sendt False( R
t message( ( sN /usr/lib/python2.7/site-packages/salt/netapi/rest_cherrypy/tools/websockets.pyt received_message- s ( t __name__t
__module__t __doc__R R ( ( ( sN /usr/lib/python2.7/site-packages/salt/netapi/rest_cherrypy/tools/websockets.pyR s ( t
__future__R R R t cherrypyt ws4py.server.cherrypyserverR R t ws4py.websocketR t ImportErrort toolst websockett enginet subscribeR ( ( ( sN /usr/lib/python2.7/site-packages/salt/netapi/rest_cherrypy/tools/websockets.pyt <module> s