2362N/A * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. 1096N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1096N/A * This code is free software; you can redistribute it and/or modify it 1096N/A * under the terms of the GNU General Public License version 2 only, as 2362N/A * published by the Free Software Foundation. Oracle designates this 1096N/A * particular file as subject to the "Classpath" exception as provided 2362N/A * by Oracle in the LICENSE file that accompanied this code. 1096N/A * This code is distributed in the hope that it will be useful, but WITHOUT 1096N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 1096N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 1096N/A * version 2 for more details (a copy is included in the LICENSE file that 1096N/A * You should have received a copy of the GNU General Public License version 1096N/A * 2 along with this work; if not, write to the Free Software Foundation, 1096N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 1096N/A * A Java API for Stream Control Transport Protocol. 1096N/A * <P> The Stream Control Transport Protocol (SCTP) is a reliable, 1096N/A * message-oriented, transport protocol existing at an equivalent level with UDP 1096N/A * (User Datagram Protocol) and TCP (Transmission Control Protocol). SCTP is 1096N/A * session oriented and an association between the endpoints must be established 1096N/A * before any data can be transmitted. 1096N/A * <P> SCTP has direct support for multi-homing, meaning than an endpoint may be 1096N/A * represented by more than one address and each address may be used for sending 1096N/A * and receiving data, thus providing network redundancy. The connection between 1096N/A * two endpoints is referred to as an association between those endpoints. 1096N/A * Endpoints can exchange a list of addresses during association setup. One 1096N/A * address is designated as the primary address, this is the default address that 1096N/A * the peer will use for sending data. A single port number is used across the 1096N/A * entire address list at an endpoint for a specific session. 1096N/A * <P> SCTP is message based. I/O operations operate upon messages and message 1096N/A * boundaries are preserved. Each association may support multiple independant 1096N/A * logical streams. Each stream represents a sequence of messages within a single 1096N/A * association and streams are independant of one another, meaning that stream 1096N/A * identifiers and sequence numbers are included in the data packet to allow 1096N/A * sequencing of messages on a per-stream basis. 1096N/A * <P> This package provides two programming model styles. The one-to-one style 1096N/A * supported by {@link com.sun.nio.sctp.SctpChannel} and {@link 1096N/A * com.sun.nio.sctp.SctpServerChannel}, and the one-to-many 1096N/A * style supported by {@link com.sun.nio.sctp.SctpMultiChannel}. 1096N/A * The semantics of the one-to-one style interface are very similar to TCP. 1096N/A * An {@code SctpChannel} can only control one SCTP association. The 1096N/A * semantics of the one-to-many style interface are very similar to UDP. An 1096N/A * {@code SctpMutliChannel} can control multiple SCTP associations. 1096N/A * <P> Applications can send and receive per-message ancillary information through 1096N/A * {@link com.sun.nio.sctp.MessageInfo}. For example, the stream number that 1096N/A * the message it is to be sent or received from. The SCTP stack is event driven 1096N/A * and applications can receive notifications of certain SCTP events by invoking 1096N/A * the {@code receive} method of the SCTP channel with an appropriate {@link 1096N/A * com.sun.nio.sctp.NotificationHandler notification handler}. 1096N/A * <P> The SCTP protocol is defined by 1096N/A * extension for <I>Dynamic Address Reconfiguration</I> is defined by