Struct crystalorb::clocksync::ClockSyncMessage [−][src]
pub struct ClockSyncMessage {
pub client_send_seconds_since_startup: f64,
pub server_seconds_since_startup: f64,
pub client_id: usize,
}
Expand description
A message sent between client and server to measure the number of seconds difference between the clocks of the two machines.
- The client first sends this structure to the server, ignoring the
server_seconds_since_startup
andclient_id
fields. Theclient_send_seconds_since_startup
records the client’s local time that this message was prepared and sent. - The server sends back this structure to the client, preserving the same
client_send_seconds_since_startup
value as it received, but populating the remainingclient_id
andserver_seconds_since_startup
values. Theserver_seconds_since_startup
is the server’s local time at which it prepared and sent this message back to the client.
Fields
client_send_seconds_since_startup: f64
The time (in seconds) when the client side sends this ClockSyncMessage
request to the
server.
server_seconds_since_startup: f64
The time (in seconds) when the server side sends this ClockSyncMessage
back to the client
as a reply to the client’s request.
client_id: usize
The client_id
that shouldn’t really belong here, but is tagging along for the ride. This
is set by the server as part of the server’s reply as well, and is set to the identifier
that the server has allocated for the client that has made the request.
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for ClockSyncMessage
impl Send for ClockSyncMessage
impl Sync for ClockSyncMessage
impl Unpin for ClockSyncMessage
impl UnwindSafe for ClockSyncMessage
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more