
    h!
              	           S r SSKJrJr  SSKJr  SSKJrJr  S\R                  4S jr
 SS\S	\R                  S
\\R                     S\4S jjrS\S	\R                  S\R                  4S jrSS/rg)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    SSK Jn   [        [        R                  U 5      $ )Nr   reactor)twisted.internetr   r   r   IReactorCorer
   s    c/root/1688_scrapy/alibaba-scraper/venv/lib/python3.13/site-packages/twisted/application/strports.py_getReactorr      s    (
''11    Ndescriptionfactoryr   c                 n    Uc
  [        5       n[        [        R                  " X 5      U5      nSUl        U$ )a:  
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}
T)r   r   r   serverFromString_raiseSynchronously)r   r   r   svcs       r   servicer      s9    , -
%""78'C #CJr   c                     SSK Jn  [        R                  " X5      u  p4n[	        [
        R                  [        USU-   5      " U0 UD65      $ )a3  
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   sH    ( )++KAND!!77HtO#Dd#Qb#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 22Z,, 2 26(( j--. !	@)::8 h
r   