AMQClient initialization arguments
Hello,
I'm only starting to learn Twisted and was wondering if it would be possible to remove the initialization arguments from AMQClient(). It seems from the Twisted documentation that arguments should be passed to the Factory and then accessed in the Protocol via self.factory.
I'm trying to implement an AmqpFactory and currently have to provide the arguments to an AmqpProtocol:
class AmqpProtocol(
def __init__(self):
delegate = TwistedDelegate()
vhost = '/'
spec = txamqp.
AMQClient.
def connectionMade(
AMQClient.
class AmqpFactory(
protocol = AmqpProtocol
def __init_
self.user = user or 'guest'
self.password = password or 'guest'
Maybe I am heading in the wrong direction. Any hints would be greatly appreciated.
Thank you,
Dan
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- txAMQP Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- reverri
- Solved:
- Last query:
- Last reply: