Many style updates around asserts, aborts, and errors
This commit is contained in:
@@ -71,15 +71,15 @@ struct Connection {
|
||||
* I/O.
|
||||
*
|
||||
* @param s The data to send (string view for zero-copy efficiency)
|
||||
* @param copyToArena If true (default), copies data to the connection's arena
|
||||
* for safe storage. If false, the caller must ensure the
|
||||
* data remains valid until all queued messages are sent.
|
||||
* @param copy_to_arena If true (default), copies data to the connection's
|
||||
* arena for safe storage. If false, the caller must ensure the data remains
|
||||
* valid until all queued messages are sent.
|
||||
*
|
||||
* @warning Thread Safety: Only call from the thread that currently owns this
|
||||
* connection. The arena allocator is not thread-safe.
|
||||
*
|
||||
* @note Performance: Use copyToArena=false for static strings or data with
|
||||
* guaranteed lifetime, copyToArena=true for temporary/dynamic data.
|
||||
* @note Performance: Use copy_to_arena=false for static strings or data with
|
||||
* guaranteed lifetime, copy_to_arena=true for temporary/dynamic data.
|
||||
*
|
||||
* Example usage:
|
||||
* ```cpp
|
||||
@@ -88,7 +88,7 @@ struct Connection {
|
||||
* conn->appendMessage(arena_allocated_data, false); // Arena data
|
||||
* ```
|
||||
*/
|
||||
void appendMessage(std::string_view s, bool copyToArena = true);
|
||||
void appendMessage(std::string_view s, bool copy_to_arena = true);
|
||||
|
||||
/**
|
||||
* @brief Mark the connection to be closed after sending all queued messages.
|
||||
|
||||
Reference in New Issue
Block a user