pub struct Connection(/* private fields */);Implementations§
Source§impl Connection
impl Connection
Sourcepub fn sync(&self, version: u32) -> Callback
pub fn sync(&self, version: u32) -> Callback
The sync request asks the EIS implementation to emit the ‘done’ event
on the returned ei_callback object. Since requests are
handled in-order and events are delivered in-order, this can
be used as a synchronization point to ensure all previous requests and the
resulting events have been handled.
The object returned by this request will be destroyed by the EIS implementation after the callback is fired and as such the client must not attempt to use it after that point.
The callback_data in the ei_callback.done event is always zero.
Note that for a client to use this request it must announce
support for the “ei_callback” interface in ei_handshake.interface_version.
It is a protocol violation to request sync without having announced the
“ei_callback” interface and the EIS implementation must disconnect
the client.
Sourcepub fn disconnect(&self)
pub fn disconnect(&self)
A request to the EIS implementation that this client should be disconnected. This is a courtesy request to allow the EIS implementation to distinquish between a client disconnecting on purpose and one disconnecting through the socket becoming invalid.
Immediately after sending this request, the client may destroy the
ei_connection object and it should close the socket. The EIS implementation
will treat the connection as already disconnected on receipt and does not
send the ei_connection.disconnect event in response to this request.
Trait Implementations§
Source§impl Clone for Connection
impl Clone for Connection
Source§fn clone(&self) -> Connection
fn clone(&self) -> Connection
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more