Struct sctp::SctpListener
[−]
[src]
pub struct SctpListener(_);
SCTP listener which behaves like a TcpListener
.
A SCTP listener is used to wait for and accept one-to-one SCTP connections.
An accepted connection is represented by SctpStream
.
Methods
impl SctpListener
[src]
fn bind<A: ToSocketAddrs>(address: A) -> Result<SctpListener>
Create a listener bound to a single address
fn bindx<A: ToSocketAddrs>(addresses: &[A]) -> Result<SctpListener>
Create a listener bound to multiple addresses. Requires at least one address
fn accept(&self) -> Result<(SctpStream, SocketAddr)>
Accept a new connection
fn incoming(&self) -> Incoming
Iterate over new connections
fn local_addrs(&self) -> Result<Vec<SocketAddr>>
Get the listener local addresses
fn set_timeout(&self, timeout: i32) -> Result<()>
Set timeout
in seconds on accept
fn try_clone(&self) -> Result<SctpListener>
Try to clone this listener
Trait Implementations
impl AsRawFd for SctpListener
[src]
impl FromRawFd for SctpListener
[src]
unsafe fn from_raw_fd(fd: RawFd) -> SctpListener
Constructs a new instance of Self
from the given raw file descriptor. Read more