Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
More documentation
Browse files Browse the repository at this point in the history
lrstewart committed Apr 5, 2024
1 parent 264d069 commit 16436df
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions api/s2n.h
Original file line number Diff line number Diff line change
@@ -1847,6 +1847,17 @@ S2N_API extern int s2n_connection_prefer_low_latency(struct s2n_connection *conn
* 5. s2n_connection_release_buffers will not release the input buffer if it
* contains buffered data.
*
* For example: if your event loop uses `poll`, you will receive an POLLIN event
* for your read file descriptor when new data is available. When you call s2n_recv
* to read that data, s2n-tls reads one or more TLS records from the file descriptor.
* If you do not call s2n_recv until it reports S2N_ERR_T_BLOCKED, some of those
* records may remain in s2n-tls's read buffer. If you read part of a record,
* s2n_peek will report the remainder of that record as available. But if you don't
* read any of a record, it remains encrypted and is not reported by s2n_peek.
* And because the data is buffered in s2n-tls instead of in the file descriptor,
* another call to `poll` will NOT report any more data available. Your application
* may hang waiting for more data.
*
* @warning This feature cannot be enabled for a connection that will enable kTLS for receiving.
*
* @warning This feature may work with blocking IO, if used carefully. Your blocking

0 comments on commit 16436df

Please sign in to comment.