o ¯bã@sÔdZddlmZddlmZmZmZmZddlm Z ee ƒGdd„dƒƒZ eeƒGdd„de ƒƒZ eeƒGd d „d e ƒƒZ Gd d „d ƒZ eeƒGd d„de ƒƒZeeƒGdd„de ƒƒZe dƒZe dƒZe dƒZdS)zM Fake client and server endpoint string parser plugins for testing purposes. é)Ú implementer)ÚIStreamClientEndpointÚ,IStreamClientEndpointStringParserWithReactorÚIStreamServerEndpointÚ!IStreamServerEndpointStringParser)ÚIPluginc@óeZdZdd„ZdS)Ú PluginBasecCs ||_dS©N)Úprefix)ÚselfÚpfx©rúD/usr/lib/python3/dist-packages/twisted/internet/test/fakeendpoint.pyÚ__init__s zPluginBase.__init__N©Ú__name__Ú __module__Ú __qualname__rrrrrr ó r c@r)ÚFakeClientParserWithReactorcOó t|||ƒSr )Ú StreamClient©r ÚaÚkwrrrÚparseStreamClientó z-FakeClientParserWithReactor.parseStreamClientN)rrrrrrrrrrrc@r)Ú FakeParsercOrr )Ú StreamServerrrrrÚparseStreamServer#rzFakeParser.parseStreamServerN)rrrr rrrrr!rrc@r)Ú EndpointBasecCs||_||_||_dSr )ÚparserÚargsÚkwargs)r r"r#r$rrrr(s zEndpointBase.__init__Nrrrrrr!'s r!c@óeZdZddd„ZdS)rNcCódSr r©r ÚprotocolFactoryrrrÚconnect0ózStreamClient.connectr )rrrr)rrrrr.órc@r%)rNcCr&r rr'rrrÚlisten7r*zStreamServer.listenr )rrrr,rrrrr5r+rÚfakeÚcrfakeÚcpfakeN)Ú__doc__Úzope.interface.declarationsrÚtwisted.internet.interfacesrrrrÚtwisted.pluginrr rrr!rrr-ÚfakeClientWithReactorÚ"fakeClientWithReactorAndPreferencerrrrÚs$