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
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