'Returns the next batch of messages to send'

def _get_tx_batch(self, seq, batch_size=None):

    if (batch_size is None):
        batch_size = MAX_TX_COUNT
    o = []
    for m in self._tx_buffer:
        if (m[0] < seq):
            continue
        o.append(m)
        if (len(o) >= batch_size):
            break
    return o
