code: def _init_socket(self):
          
          # destroy the connection if it already exists
          if self.ddpsocket:
              self.ddpsocket.remove_all_listeners('received_message')
              self.ddpsocket.remove_all_listeners('closed')
              self.ddpsocket.remove_all_listeners('opened')
              self.ddpsocket.close_connection()
              self.ddpsocket = None
  
          # create a ddp socket and subscribe to events
          self.ddpsocket = DDPSocket(self.url, self.debug)
          self.ddpsocket.on('received_message', self.received_message)
          self.ddpsocket.on('closed', self.closed)
          self.ddpsocket.on('opened', self.opened)
docs: Initialize the ddp socket