pub struct RemoteConfig {
pub server_address: ServerAddress,
pub channel_name: String,
pub conversation_id: ConversationId,
pub pool_config: ConnectionPoolConfig,
pub reconnect_config: ReconnectConfig,
/* private fields */
}Expand description
Configuration for remote SDK handles.
Fields§
§server_address: ServerAddressRemote server address. Remote mode cannot be created without this value.
channel_name: StringApplication-visible channel name.
conversation_id: ConversationIdApplication-visible conversation identifier.
pool_config: ConnectionPoolConfigCaller/runtime-supplied connection pool configuration.
reconnect_config: ReconnectConfigReconnect policy used by the SDK-003 lifecycle state machine.
Implementations§
Source§impl RemoteConfig
impl RemoteConfig
Sourcepub fn new(
server_address: impl Into<String>,
channel_name: impl Into<String>,
conversation_id: impl Into<ConversationId>,
pool_config: ConnectionPoolConfig,
) -> Result<Self, SdkError>
pub fn new( server_address: impl Into<String>, channel_name: impl Into<String>, conversation_id: impl Into<ConversationId>, pool_config: ConnectionPoolConfig, ) -> Result<Self, SdkError>
Sourcepub const fn with_reconnect_config(
self,
reconnect_config: ReconnectConfig,
) -> Self
pub const fn with_reconnect_config( self, reconnect_config: ReconnectConfig, ) -> Self
Replaces the reconnect configuration used by remote handles.
Sourcepub fn connect_tcp(self) -> Result<Self, SdkError>
pub fn connect_tcp(self) -> Result<Self, SdkError>
Opens a real TCP connection to the configured server and installs the live wire transport, replacing the in-process protocol transport.
This performs the protocol handshake (Connect -> ConnectAck) eagerly,
so a returned configuration is already connected to the server. Subsequent
publish, subscribe, and conversation calls traverse the socket.
§Errors
Returns SdkError::Connection when the TCP connection cannot be
established and SdkError::Protocol when the handshake is rejected.
Trait Implementations§
Source§impl Clone for RemoteConfig
impl Clone for RemoteConfig
Source§fn clone(&self) -> RemoteConfig
fn clone(&self) -> RemoteConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more