Skip navigation links
SCTP API

@Exported

Package com.sun.nio.sctp

A Java API for Stream Control Transport Protocol.

See: Description

Package com.sun.nio.sctp Description

A Java API for Stream Control Transport Protocol.

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 independant logical streams. Each stream represents a sequence of messages within a single association and streams are independant 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 supported by SctpChannel and SctpServerChannel, and the one-to-many style supported by SctpMultiChannel. The semantics of the one-to-one style interface are very similar to TCP. An 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 the receive method of the SCTP channel with an appropriate notification handler.

The SCTP protocol is defined by RFC4960, and the optional extension for Dynamic Address Reconfiguration is defined by RFC5061.

Since:
1.7
Skip navigation links
SCTP API


Copyright © 2009, 2016, Oracle and/or its affiliates. All rights reserved.