📂 Advanced File Manager
Multi-Root Navigation System
⚡ Quick Jump
Server (/)
Home (/home)
Var_www (/var/www)
Current (/home4/umvavtmy/public_html/website_b18404e2/wp-content/mu-plugins)
📍 Go
⬆ Ke Atas
🏠 Root Server
🏠 Root App
🔄 Refresh
📀 /
›
usr
›
lib
›
python3.9
›
site-packages
›
oci
›
_vendor
›
sseclient
›
📁 __pycache__
📍
Lokasi:
/usr/lib/python3.9/site-packages/oci/_vendor/sseclient/__pycache__
💾
Free:
47.5 GB
⚠️ Direktori ini
tidak writable
.
✏️ Mengedit: __init__.cpython-39.pyc
a ���f| � @ sB d Z ddlZdZdZdgZdZG dd� de�ZG dd � d e�ZdS ) zv Server Side Events (SSE) client for Python. Provides a generator of SSE received through an existing HTTP response. � Nz-Maxime Petazzoni <maxime.petazzoni@bulix.org>zmaxime.petazzoni@bulix.org� SSEClient�:c @ s2 e Zd ZdZddd�Zdd� Zdd� Zd d � ZdS ) r z{Implementation of a SSE client. See http://www.w3.org/TR/2009/WD-eventsource-20091029/ for the specification. �utf-8c C s. t �| jj�| _| j�d|� || _|| _dS )a3 Initialize the SSE client over an existing, ready to consume event source. The event source is expected to be a binary stream and have a close() method. That would usually be something that implements io.BinaryIOBase, like an httplib or urllib3 HTTPResponse object. z+Initialized SSE client from event source %sN)�loggingZ getLogger� __class__� __module__�_logger�debug� _event_source� _char_enc)�selfZevent_sourceZchar_enc� r �B/usr/lib/python3.9/site-packages/oci/_vendor/sseclient/__init__.py�__init__ s �zSSEClient.__init__c c sJ d}| j D ]0}|�d�D ] }||7 }|�d�r|V d}qq |rF|V dS )ar Read the incoming event source stream and yield event chunks. Unfortunately it is possible for some servers to decide to break an event into multiple HTTP chunks in the response. It is thus necessary to correctly stitch together consecutive response chunks and find the SSE delimiter (empty new line) to yield full, correct event chunks.� T)s s s N)r � splitlines�endswith)r �data�chunk�liner r r �_read% s zSSEClient._readc c s | � � D �]}t� }|�� D ]�}|�| j�}|�� r|�t�r@q|�td�}|d }||j vrn| j �d|� qt|�dkr�|d �d�r�|d dd � }q�|d }nd}|dkr�|j | |d 7 <