Your IP : 216.73.217.13


Current Path : /lib/python3/dist-packages/twisted/application/__pycache__/
Upload File :
Current File : //lib/python3/dist-packages/twisted/application/__pycache__/strports.cpython-38.pyc

U


W[��@sJdZddlmZmZddlmZddlmZd
dd�Zdd	�Z	dd	gZ
dS)z�
Construct listening port services from a simple string description.

@see: L{twisted.internet.endpoints.serverFromString}
@see: L{twisted.internet.endpoints.clientFromString}
�)�absolute_import�division)�StreamServerEndpointService)�	endpointsNcCs0|dkrddlm}tt�||�|�}d|_|S)aj
    Return the service corresponding to a description.

    @param description: The description of the listening port, in the syntax
        described by L{twisted.internet.endpoints.serverFromString}.
    @type description: C{str}

    @param factory: The protocol factory which will build protocols for
        connections to this service.
    @type factory: L{twisted.internet.interfaces.IProtocolFactory}

    @rtype: C{twisted.application.service.IService}
    @return: the service corresponding to a description of a reliable stream
        server.

    @see: L{twisted.internet.endpoints.serverFromString}
    Nr��reactorT)�twisted.internetrrrZserverFromStringZ_raiseSynchronously)�description�factoryrZsvc�r�>/usr/lib/python3/dist-packages/twisted/application/strports.py�services
�r
cCs2ddlm}t�||�\}}}t|d|�||�S)ac
    Listen on a port corresponding to a description.

    @param description: The description of the connecting port, in the syntax
        described by L{twisted.internet.endpoints.serverFromString}.
    @type description: L{str}

    @param factory: The protocol factory which will build protocols on
        connection.
    @type factory: L{twisted.internet.interfaces.IProtocolFactory}

    @rtype: L{twisted.internet.interfaces.IListeningPort}
    @return: the port corresponding to a description of a reliable virtual
        circuit server.

    @see: L{twisted.internet.endpoints.serverFromString}
    rr�listen)rrrZ_parseServer�getattr)r	r
r�name�args�kwrrrr.sr)N)�__doc__Z
__future__rrZtwisted.application.internetrrrr
r�__all__rrrr�<module>s