misc/prost-codec: Introduce codec for varint prefixed Protobuf messages (#2630)

Extracts the Protobuf en-/decoding pattern into its separate crate
and applies it to `libp2p-identify`.
This commit is contained in:
Max Inden
2022-05-05 18:28:47 +02:00
committed by GitHub
parent 3cfbf89a3a
commit bbd2f8f009
14 changed files with 234 additions and 192 deletions

View File

@ -18,8 +18,9 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
mod codec;
pub mod inbound;
pub mod outbound;
const PROTOCOL_NAME: &[u8; 13] = b"/libp2p/dcutr";
const MAX_MESSAGE_SIZE_BYTES: usize = 4096;