[−][src]Trait posix_socket::AsSocketAddress
Required methods
fn as_sockaddr(&self) -> *const sockaddr
Get a pointer to the socket address.
In reality, this should point to a struct that is compatible with libc::sockaddr,
but is not libc::sockaddr itself.
fn as_sockaddr_mut(&mut self) -> *mut sockaddr
Get a mutable pointer to the socket address.
In reality, this should point to a struct that is compatible with libc::sockaddr,
but is not libc::sockaddr itself.
fn len(&self) -> socklen_t
Get the lengths of the socket address.
This is the length of the entire socket address, including the sa_familly field.
fn set_len(&mut self, len: socklen_t)
Update the lengths of the address.
This must be the length of the entire socket address, including the sa_familly field.
It is called after the kernel wrote an address to the memory pointed at by as_sockaddr_mut().
Panic
This function should panic if the length is invalid for the specific address type.
fn max_len(&self) -> socklen_t
Get the maximum size of for the socket address.
This is used to tell the kernel how much it is allowed to write to the memory
pointed at by as_sockaddr_mut().