nghttp2_conn_write ================== Synopsis -------- *#include * .. function:: nghttp2_ssize nghttp2_conn_write(nghttp2_conn *conn, uint8_t *dest, size_t destlen, nghttp2_tstamp ts) `nghttp2_conn_write` writes HTTP/2 frames into the buffer pointed by *dest* of length *destlen*. The caller should provide a buffer of 16384 bytes long to just fit into a single TLS record. *ts* is the current timestamp. If this function returns an error code, the error is unrecoverable, therefore the application should close the underlying connection without calling any nghttp2 API for *conn*. This function returns the number of bytes written into the buffer pointed by *dest* if it succeeds, or one of the following negative error codes: :macro:`NGHTTP2_ERR_NOMEM` Out of memory. :macro:`NGHTTP2_ERR_CALLBACK_FAILURE` User callback failed. :macro:`NGHTTP2_ERR_EXCESSIVE_LOAD` The remote endpoint exhibits the behavior that causes the excessive load to the local endpoint. :macro:`NGHTTP2_ERR_CLOSING` The connection should be closed because it is terminated by GOAWAY; or the graceful shutdown has completed.