File: //usr/lib/python3/dist-packages/twisted/application/__pycache__/strports.cpython-310.pyc
o
�b!
� @ s� d Z ddlmZmZ ddlmZ ddlmZmZ dej fdd�Z
dd ed
ejdeej defdd
�Z
d ed
ejdejfdd�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�returnc C s ddl m} ttj| �S )Nr ��reactor)�twisted.internetr r r �IReactorCorer � r �>/usr/lib/python3/dist-packages/twisted/application/strports.py�_getReactor s r N�description�factoryr c C s* |du rt � }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)r r r �serverFromString�_raiseSynchronously)r r r �svcr r r
�service s �r c C s>