

def data_to_send(self, amt=None):
    "\n        Returns some data for sending out of the internal data buffer.\n\n        This method is analagous to ``read`` on a file-like object, but it\n        doesn't block. Instead, it returns as much data as the user asks for,\n        or less if that much data is not available. It does not perform any\n        I/O, and so uses a different name.\n\n        :param amt: (optional) The maximum amount of data to return. If not\n            set, or set to ``None``, will return as much data as possible.\n        :type amt: ``int``\n        :returns: A bytestring containing the data to send on the wire.\n        :rtype: ``bytes``\n        "
    if (amt is None):
        data = self._data_to_send
        self._data_to_send = b''
        return data
    else:
        data = self._data_to_send[:amt]
        self._data_to_send = data._data_to_send[amt:]
        return data

dataset/ETHPy150Open python-hyper/hyper-h2/h2/connection.py H2Connection.data_to_send/VarMisuse@59/336 `self`->`data`