Struct rmp_rpc::ClientOnlyConnector
[−]
[src]
pub struct ClientOnlyConnector<'a, 'b>(_);
A connector for MessagePack-RPC
clients. Such a connector results in a client that does not
handle requests and responses coming from the remote endpoint. It can only send requests and
notifications. Incoming requests and notifications will be silently ignored.
If you need a client that handles incoming requests and notifications, implement a Service
,
and use it with a regular Connector
(see also:
Connector::set_service_builder
)
ClientOnlyConnector
is just a wrapper around Connector
to reduce boilerplate for people who
only need a basic MessagePack-RPC client.
Methods
impl<'a, 'b> ClientOnlyConnector<'a, 'b>
[src]
fn new(address: &'a SocketAddr, handle: &'b Handle) -> Self
[src]
Create a new ClientOnlyConnector
.
fn connect(&mut self) -> Connection
[src]
Connect to the remote MessagePack-RPC
server.
fn set_tls_connector(&mut self, domain: String) -> &mut Self
[src]
Enable TLS for this connection. domain
is the hostname of the remote endpoint so which we
are connecting.
fn set_tls_connector_with_hostname_verification_disabled(&mut self) -> &mut Self
[src]
Enable TLS for this connection, but without hostname verification. This is dangerous, because it means that any server with a valid certificate will be trusted. Hence, it is not recommended.