HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //lib/python3/dist-packages/twisted/application/__pycache__/strports.cpython-310.pyc
o

�b!
�	@s�dZddlmZmZddlmZddlmZmZdej	fdd�Z
	dd	ed
ejdeej	defdd
�Z
d	ed
ejdejfdd�Zd
dgZdS)z�
Construct listening port services from a simple string description.

@see: L{twisted.internet.endpoints.serverFromString}
@see: L{twisted.internet.endpoints.clientFromString}
�)�Optional�cast)�StreamServerEndpointService)�	endpoints�
interfaces�returncCsddlm}ttj|�S)Nr��reactor)�twisted.internetr	rr�IReactorCorer�r�>/usr/lib/python3/dist-packages/twisted/application/strports.py�_getReactorsrN�description�factoryr	cCs*|durt�}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}
    NT)rrr�serverFromString�_raiseSynchronously)rrr	�svcrrr
�services�rcCs>ddlm}t�||�\}}}ttjt|d|�|i|���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)r
r	r�_parseServerrr�IListeningPort�getattr)rrr	�name�args�kwrrr
r7s
�r)N)�__doc__�typingrr�twisted.application.internetrr
rrrr�str�IProtocolFactoryrrr�__all__rrrr
�<module>s.	����
� ��
�