code: def links(self, r_server=None, mask=None):
          
          with self.lock:
              if not r_server:
                  self.send('LINKS')
              elif not mask and r_server:
                  self.send('LINKS %s' % r_server)
              else:
                  self.send('LINKS %s %s' % (r_server, mask))
              links = {}
              while self.readable():
                  msg = self._recv(expected_replies=('364', '365'))
                  segments = msg[2].split()
                  if msg[0] == '364':
                      server = segments[0]
                      desc = ' '.join(segments[3:])
                      links[server] = desc
                  elif msg[0] == '365':
                      break
              return links
docs: Get LINKS information.
          Optional arguments:
          * r_server=None - Forward the query to this server.
          * mask=None - Match mask servers.