pub struct BridgeUnderlayClient { /* private fields */ }Expand description
Client-side stream: HTTP+WS bytes in, framed underlay out (tip 6).
Implementations§
Source§impl BridgeUnderlayClient
impl BridgeUnderlayClient
Sourcepub async fn open(
session: LinuxUnderlaySession,
provided_underlay_token: &str,
) -> Result<Self, MeshUnderlayError>
pub async fn open( session: LinuxUnderlaySession, provided_underlay_token: &str, ) -> Result<Self, MeshUnderlayError>
Dial an already tip-5-handshaken session, send underlay token with OPEN,
then carry application TCP bytes. Application GATE4AGENT_BRIDGE_TOKEN
is still checked by the HTTP+WS door itself (second barrier).
pub async fn write_all(&mut self, data: &[u8]) -> Result<(), MeshUnderlayError>
pub async fn read_some(&mut self) -> Result<Vec<u8>, MeshUnderlayError>
Sourcepub async fn read_at_least(
&mut self,
min_bytes: usize,
) -> Result<Vec<u8>, MeshUnderlayError>
pub async fn read_at_least( &mut self, min_bytes: usize, ) -> Result<Vec<u8>, MeshUnderlayError>
Read until min_bytes accumulated or peer close (HTTP one-shots).
pub async fn close(self) -> Result<(), MeshUnderlayError>
Auto Trait Implementations§
impl !Freeze for BridgeUnderlayClient
impl RefUnwindSafe for BridgeUnderlayClient
impl Send for BridgeUnderlayClient
impl Sync for BridgeUnderlayClient
impl Unpin for BridgeUnderlayClient
impl UnsafeUnpin for BridgeUnderlayClient
impl UnwindSafe for BridgeUnderlayClient
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more