

def ping(self, opaque_data):
    '\n        Send a PING frame.\n\n        :param opaque_data: A bytestring of length 8 that will be sent in the\n                            PING frame.\n        :returns: Nothing\n        '
    if ((not isinstance(opaque_data, bytes)) or (len(opaque_data) != 8)):
        raise ValueError(('Invalid value for ping data: %r' % opaque_data))
    self.state_machine.process_input(ConnectionInputs.SEND_PING)
    f = PingFrame(0)
    f.opaque_data = opaque_data
    self._prepare_for_sending([f])

dataset/ETHPy150Open python-hyper/hyper-h2/h2/connection.py H2Connection.ping/original