
ngtcp2_conn_write_aggregate_pkt2
================================

Synopsis
--------

*#include <ngtcp2/ngtcp2.h>*

.. function:: ngtcp2_ssize ngtcp2_conn_write_aggregate_pkt2( ngtcp2_conn *conn, ngtcp2_path *path, ngtcp2_pkt_info *pi, uint8_t *buf, size_t buflen, size_t *pgsolen, ngtcp2_write_pkt write_pkt, size_t num_pkts, ngtcp2_tstamp ts)

    
    `ngtcp2_conn_write_aggregate_pkt2` behaves like
    `ngtcp2_conn_write_aggregate_pkt`, but it accepts *num_pkts* to
    specify the maximum number of packets to write.  If *num_pkts* is
    0, this function writes packets as much as possible.  The actual
    number of packets to write is determined by the connection state
    (e.g., the congestion controller, data available to send) and the
    length of packet produced.  It also does not clamp *buflen*, and
    does not call `ngtcp2_conn_update_pkt_tx_time`.
    
    This function offers more flexibility and optimization chances to
    an application.  It can experiment different GSO buffer size
    strategy and number of GSO writes per event loop.
    
    This function has been available since v1.17.0.
