Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove async channel from Pool #1411

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from
6 changes: 4 additions & 2 deletions protocols/v2/framing-sv2/src/framing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ type Slice = buffer_sv2::Slice;
/// A wrapper used when generic reference to a frame is needed, but the kind of frame ([`Sv2Frame`]
/// or [`HandShakeFrame`]) does not matter. Note that after the initial handshake is complete
/// between two Sv2 roles, all further messages are framed with [`Sv2Frame`].
#[derive(Debug)]
// This needs to be cloned because of broadcast channel requirement.
#[derive(Clone, Debug)]
pub enum Frame<T, B> {
HandShake(HandShakeFrame),
Sv2(Sv2Frame<T, B>),
Expand Down Expand Up @@ -232,7 +233,8 @@ impl<T, B> TryFrom<Frame<T, B>> for Sv2Frame<T, B> {
/// Contains only the serialized payload with a fixed length and is only used during Noise
/// handshake process. Once the handshake is complete, regular Sv2 communication switches to
/// [`Sv2Frame`] for ongoing communication.
#[derive(Debug)]
// This needs to be cloned because of broadcast channel requirement.
#[derive(Clone, Debug)]
pub struct HandShakeFrame {
payload: Slice,
}
Expand Down
Loading
Loading