Trait netxclient::client::INetXClient
source · pub trait INetXClient {
Show 15 methods
// Required methods
fn init<C: IController + Sync + Send + 'static>(
&self,
controller: C
) -> impl Future<Output = Result<()>>;
fn connect_network(
self: &Arc<Self>
) -> impl Future<Output = Result<()>> + Send;
fn get_tls_config(&self) -> TlsConfig;
fn get_address(&self) -> String;
fn get_service_info(&self) -> ServerOption;
fn get_session_id(&self) -> i64;
fn get_mode(&self) -> u8;
fn new_serial(&self) -> i64;
fn is_connect(&self) -> bool;
fn get_peer(&self) -> impl Future<Output = Option<Arc<NetPeer>>>;
fn set_network_client(
&self,
client: Arc<NetPeer>
) -> impl Future<Output = ()>;
fn get_callback_len(&self) -> impl Future<Output = usize>;
fn close(&self) -> impl Future<Output = Result<()>>;
fn call(
&self,
serial: i64,
buff: Data
) -> impl Future<Output = Result<RetResult>>;
fn run(&self, buff: Data) -> impl Future<Output = Result<()>>;
}
Required Methods§
sourcefn init<C: IController + Sync + Send + 'static>(
&self,
controller: C
) -> impl Future<Output = Result<()>>
fn init<C: IController + Sync + Send + 'static>( &self, controller: C ) -> impl Future<Output = Result<()>>
init netx client controller
sourcefn connect_network(self: &Arc<Self>) -> impl Future<Output = Result<()>> + Send
fn connect_network(self: &Arc<Self>) -> impl Future<Output = Result<()>> + Send
connect to network
sourcefn get_tls_config(&self) -> TlsConfig
fn get_tls_config(&self) -> TlsConfig
get ssl
sourcefn get_address(&self) -> String
fn get_address(&self) -> String
get netx server address
sourcefn get_service_info(&self) -> ServerOption
fn get_service_info(&self) -> ServerOption
get netx client service config
sourcefn get_session_id(&self) -> i64
fn get_session_id(&self) -> i64
get netx session id
sourcefn new_serial(&self) -> i64
fn new_serial(&self) -> i64
new serial id
sourcefn is_connect(&self) -> bool
fn is_connect(&self) -> bool
is connect to server
sourcefn set_network_client(&self, client: Arc<NetPeer>) -> impl Future<Output = ()>
fn set_network_client(&self, client: Arc<NetPeer>) -> impl Future<Output = ()>
set tcp socket peer
sourcefn get_callback_len(&self) -> impl Future<Output = usize>
fn get_callback_len(&self) -> impl Future<Output = usize>
get request wait callback len
Object Safety§
This trait is not object safe.