AlkantarClanX12

Your IP : 3.137.178.122


Current Path : /proc/self/root/usr/lib/python3.6/site-packages/rhn/__pycache__/
Upload File :
Current File : //proc/self/root/usr/lib/python3.6/site-packages/rhn/__pycache__/nonblocking.cpython-36.pyc

3

U��Z{	�@s�ddlZddlZddlZGdd�d�Zdd�Zedkr�ddlZejejej�Z	e	j
d
�e	j�Zee�Z
ejejej�Zej
d�ej�Ze
jegggde�e
j�Zeee��dS)�Nc@s6eZdZdd�Zdd�Zd
dd�Zdd	�Zd
d�ZdS)�NonBlockingFilecCs@||_tj|jj�tjtj�g|_g|_g|_d|_	d|_
dS)N)�fd�fcntl�fileno�F_SETFL�os�O_NDELAY�read_fd_set�write_fd_set�
exc_fd_set�	user_data�callback)�selfr�r�!/usr/lib/python3.6/nonblocking.py�__init__
szNonBlockingFile.__init__cCsH||_x$|jD]}tj|j�tjtj�qW||_||_||_||_	dS)N)
r	rrrrrr
rrr
)rr	r
rrr
�frrr�set_callbackszNonBlockingFile.set_callbackrcCs�x�d}|j|jg}|j}|j}td|�tj|||�\}}}td|||�|j|krfd}|j|j�|jr�|sx|sx|r�|j||||j�|rPqWtd�|jj	|�S)NrzCalling selectzSelect returned�Z	Returning)
r	rr
r�print�select�remover
r�read)rZamtZstatus_changedZreadfdsZwritefdsZexcfdsrrrr!s"

zNonBlockingFile.readcCs|jj|�S)N)r�write)r�datarrrr7szNonBlockingFile.writecCst|j|�S)N)�getattrr)r�namerrr�__getattr__:szNonBlockingFile.__getattr__N)r)�__name__�
__module__�__qualname__rrrrrrrrrr	s

rcCs"td|||�t|dj��dS)NzCallback calledr)rr)�r�w�errrrr
=sr
�__main__�	localhost��)r%r&)r%r')rrrrr
rZsocketZAF_INETZSOCK_STREAM�sZconnect�makefilerZss�s2rrZxxr�lenrrrr�<module>s 4