Path: blob/aarch64-shenandoah-jdk8u272-b10/jdk/src/share/classes/com/sun/nio/sctp/package-info.java
38924 views
/*1* Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/2425/**26* A Java API for Stream Control Transport Protocol.27*28* <P> The Stream Control Transport Protocol (SCTP) is a reliable,29* message-oriented, transport protocol existing at an equivalent level with UDP30* (User Datagram Protocol) and TCP (Transmission Control Protocol). SCTP is31* session oriented and an association between the endpoints must be established32* before any data can be transmitted.33*34* <P> SCTP has direct support for multi-homing, meaning than an endpoint may be35* represented by more than one address and each address may be used for sending36* and receiving data, thus providing network redundancy. The connection between37* two endpoints is referred to as an association between those endpoints.38* Endpoints can exchange a list of addresses during association setup. One39* address is designated as the primary address, this is the default address that40* the peer will use for sending data. A single port number is used across the41* entire address list at an endpoint for a specific session.42*43* <P> SCTP is message based. I/O operations operate upon messages and message44* boundaries are preserved. Each association may support multiple independant45* logical streams. Each stream represents a sequence of messages within a single46* association and streams are independant of one another, meaning that stream47* identifiers and sequence numbers are included in the data packet to allow48* sequencing of messages on a per-stream basis.49*50* <P> This package provides two programming model styles. The one-to-one style51* supported by {@link com.sun.nio.sctp.SctpChannel} and {@link52* com.sun.nio.sctp.SctpServerChannel}, and the one-to-many53* style supported by {@link com.sun.nio.sctp.SctpMultiChannel}.54* The semantics of the one-to-one style interface are very similar to TCP.55* An {@code SctpChannel} can only control one SCTP association. The56* semantics of the one-to-many style interface are very similar to UDP. An57* {@code SctpMutliChannel} can control multiple SCTP associations.58*59* <P> Applications can send and receive per-message ancillary information through60* {@link com.sun.nio.sctp.MessageInfo}. For example, the stream number that61* the message it is to be sent or received from. The SCTP stack is event driven62* and applications can receive notifications of certain SCTP events by invoking63* the {@code receive} method of the SCTP channel with an appropriate {@link64* com.sun.nio.sctp.NotificationHandler notification handler}.65*66* <P> The SCTP protocol is defined by67* <A HREF="http://tools.ietf.org/html/rfc4960">RFC4960</A>, and the optional68* extension for <I>Dynamic Address Reconfiguration</I> is defined by69* <A HREF="http://tools.ietf.org/html/rfc5061">RFC5061</A>.70*71* @since 1.772*/7374@jdk.Exported75package com.sun.nio.sctp;767778