HEX
Server: Apache
System: Linux server2.voipitup.com.au 4.18.0-553.104.1.lve.el8.x86_64 #1 SMP Tue Feb 10 20:07:30 UTC 2026 x86_64
User: posscale (1027)
PHP: 8.2.29
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //opt/alt/python38/lib/python3.8/site-packages/pymysql/__pycache__/_socketio.cpython-38.pyc
U

�
V��@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|dkrtd|��tj�|�||_d|kr6|d7}||_d|k|_d|k|_d|_dS)N)�r�w�rw�rb�wb�rwbzinvalid mode: %r�brrF)	�
ValueError�io�	RawIOBase�__init__�_sock�_mode�_reading�_writing�_timeout_occurred)�self�sock�mode�r�B/opt/alt/python38/lib/python3.8/site-packages/pymysql/_socketio.pyr!s

zSocketIO.__init__c
Cs�|��|��|jrtd��z|j�|�WStk
rHd|_�Yqtk
r�}z2|jd}|t	krrWY�q|t
kr�WY�
dS�W5d}~XYqXqdS)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�IOErrorr�	recv_into�timeout�error�args�EINTR�_blocking_errnos)rr
�e�nrrr�readinto-s 

zSocketIO.readintoc
Cs`|��|��z|j�|�WStk
rZ}z|jdtkrHWY�
dS�W5d}~XYnXdS)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
r"rrr�writeGs
zSocketIO.writecCs|jrtd��|jS)z2True if the SocketIO is open for reading.
        �I/O operation on closed socket.)�closedrr�rrrr�readableWszSocketIO.readablecCs|jrtd��|jS)z2True if the SocketIO is open for writing.
        r()r)rrr*rrr�writable^szSocketIO.writablecs|jrtd��t���S)z2True if the SocketIO is open for seeking.
        r()r)r�super�seekabler*��	__class__rrr.eszSocketIO.seekablecCs|��|j��S)z=Return the file descriptor of the underlying socket.
        )rr�filenor*rrrr1lszSocketIO.filenocCs|js|��SdSdS)N���)r)r1r*rrr�namersz
SocketIO.namecCs|jS)N)rr*rrrrysz
SocketIO.modecCs*|jr
dStj�|�|j��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
�closer�_decref_socketiosr*rrrr4}s

zSocketIO.close)�__name__�
__module__�__qualname__�__doc__rr$r'r+r,r.r1�propertyr3rr4�
__classcell__rrr/rrs

)r9�socketr�errno�__all__r �EAGAIN�EWOULDBLOCKr!r
rrrrr�<module>s