pub struct Association { /* private fields */ }
Expand description

Association represents an SCTP association 13.2. Parameters Necessary per Association (i.e., the TCB) Peer : Tag value to be sent in every packet and is received Verification: in the INIT or INIT ACK chunk. Tag :

My : Tag expected in every inbound packet and sent in the Verification: INIT or INIT ACK chunk.

Tag : State : A state variable indicating what state the association : is in, i.e., COOKIE-WAIT, COOKIE-ECHOED, ESTABLISHED, : SHUTDOWN-PENDING, SHUTDOWN-SENT, SHUTDOWN-RECEIVED, : SHUTDOWN-ACK-SENT.

No Closed state is illustrated since if a association is Closed its TCB SHOULD be removed.

Implementations§

source§

impl Association

source

pub async fn server(config: Config) -> Result<Self, Error>

server accepts a SCTP stream over a conn

source

pub async fn client(config: Config) -> Result<Self, Error>

Client opens a SCTP stream over a conn

source

pub async fn shutdown(&self) -> Result<(), Error>

Shutdown initiates the shutdown sequence. The method blocks until the shutdown sequence is completed and the connection is closed, or until the passed context is done, in which case the context’s error is returned.

source

pub async fn close(&self) -> Result<(), Error>

Close ends the SCTP Association and cleans up any state

source

pub fn bytes_sent(&self) -> usize

bytes_sent returns the number of bytes sent

source

pub fn bytes_received(&self) -> usize

bytes_received returns the number of bytes received

source

pub async fn open_stream( &self, stream_identifier: u16, default_payload_type: PayloadProtocolIdentifier ) -> Result<Arc<Stream>, Error>

open_stream opens a stream

source

pub async fn accept_stream(&self) -> Option<Arc<Stream>>

accept_stream accepts a stream

source

pub fn max_message_size(&self) -> u32

max_message_size returns the maximum message size you can send.

source

pub fn set_max_message_size(&self, max_message_size: u32)

set_max_message_size sets the maximum message size you can send.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V