Enum TcpWarpMessage

Source
pub enum TcpWarpMessage {
Show 13 variants AddPorts(Vec<u16>), Connected { connection_id: Uuid, }, BytesClient { connection_id: Uuid, data: BytesMut, }, BytesServer { data: BytesMut, }, BytesHost { connection_id: Uuid, data: BytesMut, }, Connect { connection_id: Uuid, connection: TcpWarpPortConnection, sender: Sender<TcpWarpMessage>, connected_sender: Sender<Result<(), Error>>, }, ConnectForward { connection_id: Uuid, sender: Sender<TcpWarpMessage>, connected_sender: Sender<Result<(), Error>>, }, ConnectFailure { connection_id: Uuid, }, Disconnect, Listener(AbortHandle), HostConnect { connection_id: Uuid, host: Option<String>, port: u16, }, DisconnectHost { connection_id: Uuid, }, DisconnectClient { connection_id: Uuid, },
}
Expand description

Command types.

Serialization scheme:

  • 1 - add ports u16 len * u16
  • 2 - host connect u16=(len + 2) u128 u16 len * u8
  • 3 - bytes client u128 u32 len * u8
  • 4 - bytes host u128 u32 len * u8
  • 5 - connected u128
  • 6 - disconnect host u128
  • 7 - disconnect client u128

Variants§

§

AddPorts(Vec<u16>)

§

Connected

Fields

§connection_id: Uuid
§

BytesClient

Fields

§connection_id: Uuid
§

BytesServer

Fields

§

BytesHost

Fields

§connection_id: Uuid
§

Connect

Fields

§connection_id: Uuid
§connected_sender: Sender<Result<(), Error>>
§

ConnectForward

Fields

§connection_id: Uuid
§connected_sender: Sender<Result<(), Error>>
§

ConnectFailure

Fields

§connection_id: Uuid
§

Disconnect

§

Listener(AbortHandle)

§

HostConnect

Fields

§connection_id: Uuid
§port: u16
§

DisconnectHost

Fields

§connection_id: Uuid
§

DisconnectClient

Fields

§connection_id: Uuid

Trait Implementations§

Source§

impl Debug for TcpWarpMessage

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.