Struct sctp::SctpEndpoint [] [src]

pub struct SctpEndpoint(_);

One-to-many SCTP endpoint.

Methods

impl SctpEndpoint
[src]

fn bind<A: ToSocketAddrs>(address: A) -> Result<SctpEndpoint>

Create a one-to-many SCTP endpoint bound to a single address

fn bindx<A: ToSocketAddrs>(addresses: &[A]) -> Result<SctpEndpoint>

Create a one-to-many SCTP endpoint bound to a multiple addresses. Requires at least one address

fn recv_from(&self, msg: &mut [u8]) -> Result<(usize, u16, SocketAddr)>

Wait for data to be received. On success, returns a triplet containing the quantity of bytes received, the sctp stream id on which data were received, and the socket address used by the peer to send the data

fn send_to<A: ToSocketAddrs>(&self, msg: &mut [u8], address: A, stream: u16) -> Result<usize>

Send data in Sctp style, to the provided address on the stream stream. On success, returns the quantity on bytes sent

fn local_addrs(&self) -> Result<Vec<SocketAddr>>

Get local socket addresses to which this socket is bound

fn shutdown(&self, how: Shutdown) -> Result<()>

Shuts down the read, write, or both halves of this connection

fn set_nodelay(&self, nodelay: bool) -> Result<()>

Set or unset SCTP_NODELAY option

fn has_nodelay(&self) -> Result<bool>

Verify if SCTP_NODELAY option is activated for this socket

fn set_buffer_size(&self, dir: SoDirection, size: usize) -> Result<()>

Set the socket buffer size for the direction specified by dir. Linux systems will double the provided size

fn get_buffer_size(&self, dir: SoDirection) -> Result<usize>

Get the socket buffer size for the direction specified by dir

fn set_timeout(&self, dir: SoDirection, timeout: i32) -> Result<()>

Set timeout in seconds for operation dir (either receive or send)

fn try_clone(&self) -> Result<SctpEndpoint>

Try to clone this socket

Trait Implementations

impl AsRawHandle for SctpEndpoint
[src]

fn as_raw_handle(&self) -> RawHandle

Extracts the raw handle, without taking any ownership.

impl FromRawHandle for SctpEndpoint
[src]

unsafe fn from_raw_handle(hdl: RawHandle) -> SctpEndpoint

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