Struct copra::protocol::ProtoCodec [] [src]

pub struct ProtoCodec { /* fields omitted */ }

Server side codec that can deduce protocol from byte stream

Server can provide services to clients that use different protocols. When a new connection is established, the server try each protocol until it succeeds in decoding the request. Since copra use keep-alive connections to exchange messages, this match is cached so that the protocol resolution overhead is only incurred when receiving the first request.

Methods

impl ProtoCodec
[src]

[src]

Create a new codec that support multiple protocols.

Trait Implementations

impl Debug for ProtoCodec
[src]

[src]

Formats the value using the given formatter.

impl Decoder for ProtoCodec
[src]

The type of decoded frames.

The type of unrecoverable frame decoding errors. Read more

[src]

Attempts to decode a frame from the provided buffer of bytes. Read more

[src]

A default method available to be called when there are no more bytes available to be read from the underlying I/O. Read more

impl Encoder for ProtoCodec
[src]

The type of items consumed by the Encoder

The type of encoding errors. Read more

[src]

Encodes a frame into the buffer provided. Read more