ó ·\c@sidZddlTddlZddlZdgZejZejejfZdej fd„ƒYZ dS(s} SocketIO imported from socket module in Python 3. Copyright (c) 2001-2013 Python Software Foundation; All Rights Reserved. iÿÿÿÿ(t*NtSocketIOcBsteZdZd„Zd„Zd„Zd„Zd„Zd„Zd„Z e d„ƒZ e d „ƒZ d „Z RS( s¬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. cCs…|d krtd|ƒ‚ntjj|ƒ||_d|krQ|d7}n||_d|k|_d|k|_t|_ dS( Ntrtwtrwtrbtwbtrwbsinvalid mode: %rtb(RRRRRR( t ValueErrortiot RawIOBaset__init__t_sockt_modet_readingt_writingtFalset_timeout_occurred(tselftsocktmode((s2/tmp/pip-build-7KIPgS/PyMySQL/pymysql/_socketio.pyR !s     cCsµ|jƒ|jƒ|jr,tdƒ‚nx‚tr°y|jj|ƒSWq/tk rht|_‚q/tk r¬}|j d}|t kr–q/n|t kr¦dS‚q/Xq/WdS(s3Read 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. s!cannot read from timed out objectiN( t _checkClosedt_checkReadableRtIOErrortTrueR t recv_intottimeoutterrortargstEINTRt_blocking_errnostNone(RRtetn((s2/tmp/pip-build-7KIPgS/PyMySQL/pymysql/_socketio.pytreadinto-s"         cCs\|jƒ|jƒy|jj|ƒSWn-tk rW}|jdtkrQdS‚nXdS(sWrite 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. iN(Rt_checkWritableR tsendRRRR (RRR!((s2/tmp/pip-build-7KIPgS/PyMySQL/pymysql/_socketio.pytwriteGs  cCs|jrtdƒ‚n|jS(s2True if the SocketIO is open for reading. sI/O operation on closed socket.(tclosedR R(R((s2/tmp/pip-build-7KIPgS/PyMySQL/pymysql/_socketio.pytreadableWs cCs|jrtdƒ‚n|jS(s2True if the SocketIO is open for writing. sI/O operation on closed socket.(R'R R(R((s2/tmp/pip-build-7KIPgS/PyMySQL/pymysql/_socketio.pytwritable^s cCs%|jrtdƒ‚ntƒjƒS(s2True if the SocketIO is open for seeking. sI/O operation on closed socket.(R'R tsupertseekable(R((s2/tmp/pip-build-7KIPgS/PyMySQL/pymysql/_socketio.pyR+es cCs|jƒ|jjƒS(s=Return the file descriptor of the underlying socket. (RR tfileno(R((s2/tmp/pip-build-7KIPgS/PyMySQL/pymysql/_socketio.pyR,ls cCs|js|jƒSdSdS(Niÿÿÿÿ(R'R,(R((s2/tmp/pip-build-7KIPgS/PyMySQL/pymysql/_socketio.pytnamers  cCs|jS(N(R(R((s2/tmp/pip-build-7KIPgS/PyMySQL/pymysql/_socketio.pyRyscCs7|jr dStjj|ƒ|jjƒd|_dS(s‡Close the SocketIO object. This doesn't close the underlying socket, except if all references to it have disappeared. N(R'R R tcloseR t_decref_socketiosR (R((s2/tmp/pip-build-7KIPgS/PyMySQL/pymysql/_socketio.pyR.}s   (t__name__t __module__t__doc__R R#R&R(R)R+R,tpropertyR-RR.(((s2/tmp/pip-build-7KIPgS/PyMySQL/pymysql/_socketio.pyRs      ( R2tsocketR terrnot__all__RtEAGAINt EWOULDBLOCKRR R(((s2/tmp/pip-build-7KIPgS/PyMySQL/pymysql/_socketio.pyts