pub struct WebSocketRemoteTransport { /* private fields */ }Expand description
Real WebSocket transport that exchanges canonical wire frames with a liminal server over the sibling WebSocket acceptor.
The frame construction and response mapping deliberately mirror the TCP transport line for line; the cross-transport byte-identity and behavioral parity tests pin the two implementations together so they cannot drift apart silently.
Implementations§
Source§impl WebSocketRemoteTransport
impl WebSocketRemoteTransport
Sourcepub fn connect(server_address: &ServerAddress) -> Result<Self, SdkError>
pub fn connect(server_address: &ServerAddress) -> Result<Self, SdkError>
Connects to the ws:// server address, completes the WebSocket
upgrade and liminal handshake, and returns a ready transport.
§Errors
Returns SdkError::Connection when the address is not a usable
ws:// URL, the client unit refuses the open, the socket cannot
be established, or the handshake is rejected, and
SdkError::Protocol when frames cannot be encoded or decoded.
Sourcepub fn connect_with_auth(
server_address: &ServerAddress,
auth_token: &[u8],
) -> Result<Self, SdkError>
pub fn connect_with_auth( server_address: &ServerAddress, auth_token: &[u8], ) -> Result<Self, SdkError>
Connects and handshakes carrying auth_token, for a server gated
by an [auth] section. Additive to connect; an empty token is
equivalent to it.
§Errors
Returns SdkError::Connection when the connection cannot be
established or the token is rejected, and SdkError::Protocol
when the handshake frames cannot be encoded or sent.
Sourcepub fn reconnect(&self) -> Result<(), SdkError>
pub fn reconnect(&self) -> Result<(), SdkError>
Performs one authorized reconnect open through the client unit’s typed permit path (R2.2): a permit retained from the established loss — or a fresh explicit caller action — authorizes exactly one real open. There is no automatic retry and no timer.
§Errors
Returns SdkError::Connection when the transport is still
connected, the client unit refuses the open, or the open fails
(parking the aggregate without retry authority).
Sourcepub fn reconnect_state(&self) -> ReconnectState
pub fn reconnect_state(&self) -> ReconnectState
Reports the client unit’s reconnect state for this transport.