code: async def _heartbeat_callback(self):
          
          query = {
              "MPRPC": self.VERSION,
              "HEARTBEAT": "ping"
          }
          queryb = self.encoder(query)
          while True:
              await asyncio.sleep(self.heart_beat)
              self.writer.write(queryb)
              if self.debug is True:
                  print("ping")
docs: 如果设置了心跳,则调用这个协程.