pub trait Socket:
Send
+ Sync
+ 'static {
// Required methods
fn local_addr(&self) -> Result<SocketAddr>;
fn peer_addr(&self) -> Result<SocketAddr>;
}Expand description
Common information exposed by a Socket-like construct.
For now this is implemented for TCP and UDP, as these are the types that are relevant to Rama.
Required Methods§
Sourcefn local_addr(&self) -> Result<SocketAddr>
fn local_addr(&self) -> Result<SocketAddr>
Try to get the local address of the socket.
Sourcefn peer_addr(&self) -> Result<SocketAddr>
fn peer_addr(&self) -> Result<SocketAddr>
Try to get the remote address of the socket.