Commit Graph
5 Commits
Author SHA1 Message Date
Doyleandwowario e0a9633557 ByteSlice: Fix persisting ptr to std::moved SSO buffer
The Bug:
1. Construct `byte_slice.portion_` with `epee::span(buffer)` which copies a pointer to the SSO buffer to `byte_slice.portion_`
2. It constructs `byte_slice.storage_` with `std::move(buffer)` (normally this swap pointers, but SSO means a memcpy and clear on the original SSO buffer)
3. `slice.data()` returns a pointer from `slice.portion_` that points to the original SSO cleared buffer, `slice.storage_` has the actual string.
2020-05-25 13:07:28 +03:00
Lee Clagettandwowario 4c757a7a2a Fixed bugs for take_slice and byte_stream->byte_slice 2020-05-14 18:25:49 +03:00
Lee Clagettandwowario 0b8e49a0aa Add byte_stream for zero-copy serialization, and add support in ZMQ-JSON. 2020-05-09 11:35:23 +03:00
Lee Clagettandwowario 9fb542e89c Use byte_slice for sending zmq messages - removes data copy within zmq 2020-05-04 10:13:38 +03:00
Lee Clagett bdfc63ae4d Add ref-counted buffer byte_slice. Currently used for sending TCP data. 2019-07-16 16:30:35 +00:00