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Úkwr r r r.s r)N) Ú__doc__Z __future__rrZtwisted.application.internetrrrr rÚ__all__r r r r Ús