[][src]Enum tcpwarp::TcpWarpMessage

pub enum TcpWarpMessage {
    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,
    },
}

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 of Connected

connection_id: Uuid
BytesClient

Fields of BytesClient

connection_id: Uuiddata: BytesMut
BytesServer

Fields of BytesServer

data: BytesMut
BytesHost

Fields of BytesHost

connection_id: Uuiddata: BytesMut
Connect

Fields of Connect

connection_id: Uuidconnection: TcpWarpPortConnectionsender: Sender<TcpWarpMessage>connected_sender: Sender<Result<(), Error>>
ConnectForward

Fields of ConnectForward

connection_id: Uuidsender: Sender<TcpWarpMessage>connected_sender: Sender<Result<(), Error>>
ConnectFailure

Fields of ConnectFailure

connection_id: Uuid
Disconnect
Listener(AbortHandle)
HostConnect

Fields of HostConnect

connection_id: Uuidhost: Option<String>port: u16
DisconnectHost

Fields of DisconnectHost

connection_id: Uuid
DisconnectClient

Fields of DisconnectClient

connection_id: Uuid

Trait Implementations

impl Debug for TcpWarpMessage[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,