public class SctpDataChunkImpl extends DelegatingSctpChunk implements SctpDataChunk
SctpChunk.Type| Modifier and Type | Method and Description |
|---|---|
Buffer |
getHeader()
Get the raw header of this SCTP Chunk
|
long |
getPayloadProtocolIdentifier()
This value represents an application (or upper layer) specified
protocol identifier.
|
int |
getStreamIdentifier()
Identifies the stream to which the following user data belongs.
|
int |
getStreamSequenceNumber()
This value represents the Stream Sequence Number of the following
user data within the stream S.
|
long |
getTransmissionSequenceNumber()
This value represents the TSN for this DATA chunk.
|
Buffer |
getUserData()
The actual payload of the data chunk.
|
boolean |
isBeginningFragment()
Flag: B bit
|
boolean |
isEndingFragment()
Flag: E bit
|
boolean |
isImmediate()
Flag: I bit
|
boolean |
isUnordered()
Flag: U bit
|
static SctpDataChunk |
of(DefaultSctpChunk chunk) |
getFlags, getLength, getPadding, getType, getValue, getValueLengthclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetTypeframe, getFlags, getLength, getPadding, getValue, getValueLength, lookuppublic static final SctpDataChunk of(DefaultSctpChunk chunk)
public Buffer getHeader()
SctpChunkgetHeader in interface SctpChunkgetHeader in class DelegatingSctpChunkpublic boolean isUnordered()
SctpDataChunkThe (U)nordered bit, if set to '1', indicates that this is an unordered DATA chunk, and there is no Stream Sequence Number assigned to this DATA chunk. Therefore, the receiver MUST ignore the Stream Sequence Number field.
After reassembly (if necessary), unordered DATA chunks MUST be dispatched to the upper layer by the receiver without any attempt to reorder.
If an unordered user message is fragmented, each fragment of the message MUST have its U bit set to '1'.
(source: RFC 4960 Section 3.3.1)
isUnordered in interface SctpDataChunkpublic boolean isBeginningFragment()
SctpDataChunk(source: RFC 4960 Section 3.3.1)
isBeginningFragment in interface SctpDataChunkpublic boolean isEndingFragment()
SctpDataChunkThe (E)nding fragment bit, if set, indicates the last fragment of a user message.
An unfragmented user message shall have both the B and E bits set to '1'. Setting both B and E bits to '0' indicates a middle fragment of a multi-fragment user message, as summarized in the following table:
B E Description
============================================================
| 1 0 | First piece of a fragmented user message |
+----------------------------------------------------------+
| 0 0 | Middle piece of a fragmented user message |
+----------------------------------------------------------+
| 0 1 | Last piece of a fragmented user message |
+----------------------------------------------------------+
| 1 1 | Unfragmented message |
============================================================
| Table 1: Fragment Description Flags |
============================================================
When a user message is fragmented into multiple chunks, the TSNs are used by the receiver to reassemble the message. This means that the TSNs for each fragment of a fragmented user message MUST be strictly sequential. (source: RFC 4960 Section 3.3.1)
isEndingFragment in interface SctpDataChunkpublic boolean isImmediate()
SctpDataChunkBy setting this bit, the sender of a DATA chunk indicates that the corresponding SACK chunk should not be delayed.
(source: RFC 7053 Section 3)
isImmediate in interface SctpDataChunkpublic long getTransmissionSequenceNumber()
SctpDataChunk(source: RFC 4960 Section 3.3.1)
getTransmissionSequenceNumber in interface SctpDataChunkpublic int getStreamIdentifier()
SctpDataChunk(source: RFC 4960 Section 3.3.1)
getStreamIdentifier in interface SctpDataChunkpublic int getStreamSequenceNumber()
SctpDataChunkWhen a user message is fragmented by SCTP for transport, the same Stream Sequence Number MUST be carried in each of the fragments of the message.
(source: RFC 4960 Section 3.3.1)
getStreamSequenceNumber in interface SctpDataChunkpublic long getPayloadProtocolIdentifier()
SctpDataChunkThe value 0 indicates that no application identifier is specified by the upper layer for this payload data.
(source: RFC 4960 Section 3.3.1)
getPayloadProtocolIdentifier in interface SctpDataChunkpublic Buffer getUserData()
SctpDataChunkgetUserData in interface SctpDataChunkCopyright © 2021. All Rights Reserved.