pub struct Interface<A: PtpAddressFamily> { /* private fields */ }Expand description
A handle for a network interface
Describes the configured network interface and way of timestamping for its sockets. It also ensures the requested timestamping clock remains available on the interface during its existence.
Implementations§
Source§impl<A: PtpAddressFamily> Interface<A>
impl<A: PtpAddressFamily> Interface<A>
Sourcepub fn listen_socket(&self) -> OpenSocket<A>
pub fn listen_socket(&self) -> OpenSocket<A>
Create an open socket intended for listening to the network.
Creates a socket that is intended to receive traffic from any remote, potentially providing responses to that traffic.
Sourcepub fn connected_socket(
&self,
local: Option<A>,
remote: A,
) -> ConnectedSocket<A>
pub fn connected_socket( &self, local: Option<A>, remote: A, ) -> ConnectedSocket<A>
Create a socket connected to a specific remote address.
This creates a socket intended for use in communicating with a single
remote party over the interface. The remote address specifies the
network address of that party.
The local address specifies which address should be used as the
sender address on the messages. If this is not specified, the operating
system will select a send address automatically.