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.


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

Trait Implementations

impl AsRawHandle for SctpListener

fn as_raw_handle(&self) -> RawHandle

Extracts the raw handle, without taking any ownership.

impl FromRawHandle for SctpListener

unsafe fn from_raw_handle(hdl: RawHandle) -> SctpListener

Constructs a new I/O object from the specified raw handle. Read more