def METHOD_NAME(self):
    ''' Starting of main loop. '''
    # Final Initialization
    # Initialization of sockets.
    self.event_io.bind('inproc://event')
    self.stream_out.bind('inproc://stream')
    self.poller.register(self.event_io, zmq.POLLIN)
    # Start the I/O thread, and receive from it this node's ID
    self.iothread.METHOD_NAME()
    self.send_event(b'REGISTER')
    self.node_id = self.event_io.recv_multipart()[-1]
    self.host_id = self.node_id[:5]
    print(f'Node started, id={self.node_id}')
    # run() implements the main loop
    self.run()
    # Send quit event to the worker thread and wait for it to close.
    self.event_io.send(b'QUIT')
    self.iothread.join()