src/pyams_zmq/process.py
changeset 18 cd5a88ba2223
parent 13 839b61e1531a
child 22 05aaf0acf4fb
equal deleted inserted replaced
17:c958d2a066f6 18:cd5a88ba2223
    53         self.passwords = dict([auth.split(':', 1)]) if auth else None
    53         self.passwords = dict([auth.split(':', 1)]) if auth else None
    54         self.clients = clients.split() if clients else None
    54         self.clients = clients.split() if clients else None
    55 
    55 
    56     def setup(self):
    56     def setup(self):
    57         """Creates a :attr:`context` and an event :attr:`loop` for the process."""
    57         """Creates a :attr:`context` and an event :attr:`loop` for the process."""
       
    58         ioloop.install()
    58         ctx = self.context = zmq.Context()
    59         ctx = self.context = zmq.Context()
    59         auth = self.auth_thread = ThreadAuthenticator(ctx)
    60         auth = self.auth_thread = ThreadAuthenticator(ctx)
    60         auth.start()
    61         auth.start()
    61         if self.clients:
    62         if self.clients:
    62             auth.allow(*self.clients)
    63             auth.allow(*self.clients)