Skip to content
Snippets Groups Projects
Commit ca3b33a1 authored by Nick Mathewson's avatar Nick Mathewson :spider_web:
Browse files

tor-cell: Refactor relay cells to copy much less

We now manipulate raw relay cell bodies as (an alias for)
`Box<[u8;509]>` rather than as (an alias for) `[u8;509]`.  This
enables us to do much less copying.  It will become more important
soon, as we defer parsing relay cell bodies even longer.

Related to #7.

We also use SliceWriter to avoid allocating a Vec<> for every relay
message we want to encode, and instead encode directly into the
cell.
parent 9e2b6f3a
Branches
Tags
1 merge request!1017Finish #525 for relay messages: Only parse messages at the last instant.
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment