HEX
Server: LiteSpeed
System: Linux us-phx-web1284.main-hosting.eu 4.18.0-553.109.1.lve.el8.x86_64 #1 SMP Thu Mar 5 20:23:46 UTC 2026 x86_64
User: u300739242 (300739242)
PHP: 8.2.30
Disabled: system, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail
Upload Files
File: //usr/lib/python3.6/site-packages/pymysql/__pycache__/_socketio.cpython-36.pyc
3

B��Z��@sJdZddlTddlZddlZdgZejZejejfZGdd�dej	�Z
dS)z}
SocketIO imported from socket module in Python 3.

Copyright (c) 2001-2013 Python Software Foundation; All Rights Reserved.
�)�*N�SocketIOcspeZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Z�fdd
�Z	dd�Z
edd��Zedd��Z
dd�Z�ZS)rz�Raw I/O implementation for stream sockets.

    This class supports the makefile() method on sockets.  It provides
    the raw I/O interface on top of a socket object.
    cCsZ|d
krtd|��tjj|�||_d|kr6|d7}||_d|k|_d|k|_d	|_dS)N�r�w�rw�rb�wb�rwbzinvalid mode: %r�bF)rrrrrr	)	�
ValueError�io�	RawIOBase�__init__�_sock�_mode�_reading�_writing�_timeout_occurred)�selfZsock�mode�r�/usr/lib/python3.6/_socketio.pyr!s

zSocketIO.__init__cCs�|j�|j�|jrtd��xpy|jj|�Stk
rHd|_�Yq tk
r�}z(|jd}|t	krlw |t
krxdS�WYdd}~Xq Xq WdS)a3Read up to len(b) bytes into the writable buffer *b* and return
        the number of bytes read.  If the socket is non-blocking and no bytes
        are available, None is returned.

        If *b* is non-empty, a 0 return value indicates that the connection
        was shutdown at the other end.
        z!cannot read from timed out objectTrN)�_checkClosed�_checkReadabler�IOErrorrZ	recv_intoZtimeout�error�args�EINTR�_blocking_errnos)rr
�e�nrrr�readinto-s"
zSocketIO.readintocCsX|j�|j�y|jj|�Stk
rR}z|jdtkr@dS�WYdd}~XnXdS)aWrite the given bytes or bytearray object *b* to the socket
        and return the number of bytes written.  This can be less than
        len(b) if not all data could be written.  If the socket is
        non-blocking and no bytes could be written None is returned.
        rN)r�_checkWritabler�sendrrr)rr
rrrr�writeGszSocketIO.writecCs|jrtd��|jS)z2True if the SocketIO is open for reading.
        zI/O operation on closed socket.)�closedrr)rrrr�readableWszSocketIO.readablecCs|jrtd��|jS)z2True if the SocketIO is open for writing.
        zI/O operation on closed socket.)r%rr)rrrr�writable^szSocketIO.writablecs|jrtd��t�j�S)z2True if the SocketIO is open for seeking.
        zI/O operation on closed socket.)r%r�super�seekable)r)�	__class__rrr)eszSocketIO.seekablecCs|j�|jj�S)z=Return the file descriptor of the underlying socket.
        )rr�fileno)rrrrr+lszSocketIO.filenocCs|js|j�SdSdS)N����)r%r+)rrrr�namersz
SocketIO.namecCs|jS)N)r)rrrrrysz
SocketIO.modecCs*|jr
dStjj|�|jj�d|_dS)z�Close the SocketIO object.  This doesn't close the underlying
        socket, except if all references to it have disappeared.
        N)r%rr
�closerZ_decref_socketios)rrrrr/}s

zSocketIO.close)�__name__�
__module__�__qualname__�__doc__rr!r$r&r'r)r+�propertyr.rr/�
__classcell__rr)r*rrs)r3Zsocketr�errno�__all__rZEAGAINZEWOULDBLOCKrr
rrrrr�<module>s