drogue-iot / embedded-tls

An Rust TLS 1.3 implementation for embedded devices.
Apache License 2.0
172 stars 22 forks source link

Buffered writes #72

Closed rmja closed 1 year ago

rmja commented 1 year ago

Important: This is a breaking change!

Previous behavior: TlsConnection::write() was by itself flush'ing in nature, in that, no matter the buffer to be written, it encoded it as a tls record and wrote it to the connection immediately.

New behavior: TlsConnection::write() now buffer any writes to create larger tls records which in turn reduces overhead and bandwidth. To ensure that the last record is actually written, one must call TlsConnection::flush().