
    \d!
              	           d Z ddlmZmZ ddlmZ ddlmZmZ dej	        fdZ
	 dded	ej        d
eej	                 defdZded	ej        dej        fdZddgZdS )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                  B    ddl m}  t          t          j        |           S )Nr   reactor)twisted.internetr   r   r   IReactorCorer
   s    <lib/python3.11/site-packages/twisted/application/strports.py_getReactorr      s'    ((((((
'111    Ndescriptionfactoryr   c                 z    |t                      }t          t          j        ||           |          }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   svcs       r   servicer      sB    , --
%"7K88' C #CJr   c           	          ddl m} t          j        | |          \  }}}t	          t
          j         t          |d|z             |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}
    r   r
   listen)r   r   r   _parseServerr   r   IListeningPortgetattr)r   r   r   nameargskws         r   r   r   7   sf    ( )(((((+KAAND$!#D77HtO#D#Dd#Qb#Q#Q  r   r   r   )N)__doc__typingr   r   twisted.application.internetr   r   r   r   r   r   strIProtocolFactoryr   r   r   __all__ r   r   <module>r'      s  
  " ! ! ! ! ! ! ! D D D D D D 2 2 2 2 2 2 2 22Z, 2 2 2 2 26 ( j-. !	   @):   8 h
r   