The Stream Control Transport Protocol (SCTP) is a reliable, message-oriented, transport protocol existing at an equivalent level with UDP (User Datagram Protocol) and TCP (Transmission Control Protocol). SCTP is session oriented and an association between the endpoints must be established before any data can be transmitted.
SCTP has direct support for multi-homing, meaning than an endpoint may be represented by more than one address and each address may be used for sending and receiving data, thus providing network redundancy. The connection between two endpoints is referred to as an association between those endpoints. Endpoints can exchange a list of addresses during association setup. One address is designated as the primary address, this is the default address that the peer will use for sending data. A single port number is used across the entire address list at an endpoint for a specific session.
SCTP is message based. I/O operations operate upon messages and message boundaries are preserved. Each association may support multiple independent logical streams. Each stream represents a sequence of messages within a single association and streams are independent of one another, meaning that stream identifiers and sequence numbers are included in the data packet to allow sequencing of messages on a per-stream basis.
This package provides two programming model styles. The one-to-one style
SctpServerChannel, and the one-to-many
style supported by
The semantics of the one-to-one style interface are very similar to TCP.
SctpChannel can only control one SCTP association. The
semantics of the one-to-many style interface are very similar to UDP. An
SctpMutliChannel can control multiple SCTP associations.
Applications can send and receive per-message ancillary information through
MessageInfo. For example, the stream number that
the message it is to be sent or received from. The SCTP stack is event driven
and applications can receive notifications of certain SCTP events by invoking
receive method of the SCTP channel with an appropriate
Interface Summary Interface Description NotificationA notification from the SCTP stack. NotificationHandler<T>A handler for consuming notifications from the SCTP stack. SctpSocketOption<T>A socket option associated with an SCTP channel.
Class Summary Class Description AbstractNotificationHandler<T>A skeletal handler that consumes notifications and continues. AssociationA class that represents an SCTP association. AssociationChangeNotificationNotification emitted when an association has either opened or closed. MessageInfoThe
MessageInfoclass provides additional ancillary information about messages.
PeerAddressChangeNotificationNotification emitted when a destination address on a multi-homed peer encounters a change. SctpChannelA selectable channel for message-oriented connected SCTP sockets. SctpMultiChannelA selectable channel for message-oriented SCTP sockets. SctpServerChannelA selectable channel for message-oriented listening SCTP sockets. SctpStandardSocketOptionsSCTP channels supports the socket options defined by this class (as well as those listed in the particular channel class) and may support additional Implementation specific socket options. SctpStandardSocketOptions.InitMaxStreamsThis class is used to set the maximum number of inbound/outbound streams used by the local endpoint during association initialization. SendFailedNotificationNotification emitted when a send failed notification has been received. ShutdownNotificationNotification emitted when a peers shutdowns an the association.
Enum Summary Enum Description AssociationChangeNotification.AssocChangeEventDefines the type of change event that happened to the association. HandlerResultDefines notification handler results. PeerAddressChangeNotification.AddressChangeEventDefines the type of address change event that occurred to the destination address on a multi-homed peer when it encounters a change of interface details.
Exception Summary Exception Description IllegalReceiveException IllegalUnbindExceptionUnchecked exception thrown when an attempt is made to remove an address that is not bound to the channel, or remove an address from a channel that has only one address bound to it. InvalidStreamExceptionUnchecked exception thrown when an attempt is made to send a message to an invalid stream.