/usr/lib/python3/dist-packages/twisted/application/__pycache__
Edit: /usr/lib/python3/dist-packages/twisted/application/__pycache__/strports.cpython-310.pyc (2634B)
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> ddl m} t | |¡\}}}ttjt|d| ƒ|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Úkwr r r
r 7 s
ÿr )N)Ú__doc__Útypingr r Útwisted.application.internetr r
r r r r ÚstrÚIProtocolFactoryr r r Ú__all__r r r r
Ú
s. ýÿþý
ü ÿÿ
þ