Ϫf! dZddlmZmZddlmZddlmZmZdejfdZ dde d ejd eejdefd Z de d ejdejfd Zd dgZy)z Construct listening port services from a simple string description. @see: L{twisted.internet.endpoints.serverFromString} @see: L{twisted.internet.endpoints.clientFromString} )Optionalcast)StreamServerEndpointService) endpoints interfacesreturncBddlm}ttj|S)Nrreactor)twisted.internetr rr IReactorCorer s >/usr/lib/python3/dist-packages/twisted/application/strports.py _getReactorrs(  '' 11N descriptionfactoryr cl| t}ttj|||}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} T)rrrserverFromString_raiseSynchronously)rrr svcs rservicers;,- %""7K8' C#C Jrc ddlm}tj||\}}}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} rr listen)r r r _parseServerrrIListeningPortgetattr)rrr nameargskws rrr7sO()++KAND$ !!#D77HtO#Dd#Qb#Q rrr)N)__doc__typingrrtwisted.application.internetrr rrr rstrIProtocolFactoryrrr__all__rrr's  "D22Z,,226  ( (j-- .! @)::8 h r