golden hour
/opt/saltstack/salt/lib/python3.10/site-packages/salt/netapi/rest_cherrypy/tools/__pycache__
⬆️ Go Up
Upload
File/Folder
Size
Actions
__init__.cpython-310.pyc
185 B
Del
OK
websockets.cpython-310.pyc
1.96 KB
Del
OK
Edit: websockets.cpython-310.pyc
o �xeb � @ sP d dl Z d dlmZmZ d dlmZ e� e j_ee j�� � G dd� de�Z dS )� N)�WebSocketPlugin� WebSocketTool)� WebSocketc s( e Zd ZdZ� fdd�Zdd� Z� ZS )�SynchronizingWebsocketa� 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 its 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 s( t � j|i |�� d | _d | _d | _d S )N)�super�__init__�pipe�token�opts)�self�args�kwargs�� __class__� �^/opt/saltstack/salt/lib/python3.10/site-packages/salt/netapi/rest_cherrypy/tools/websockets.pyr s zSynchronizingWebsocket.__init__c C s, |j �d�dkr| j�|� | �dd� dS )a� 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. zutf-8zwebsocket client readyzserver received messageFN)�data�decoder �send)r �messager r r �received_message* s z'SynchronizingWebsocket.received_message)�__name__� __module__�__qualname__�__doc__r r � __classcell__r r r r r s r )ZcherrypyZws4py.server.cherrypyserverr r Zws4py.websocketr ZtoolsZ websocketZengineZ subscriber r r r r �<module> s
Save