Show / Hide Table of Contents

Class RTCSctpTransport

Represents an SCTP transport that uses a DTLS transport.

Inheritance
System.Object
SctpTransport
RTCSctpTransport
Inherited Members
SctpTransport.DEFAULT_COOKIE_LIFETIME_SECONDS
SctpTransport.GotInit(SctpPacket, IPEndPoint)
SctpTransport.GetInitAck(SctpPacket, IPEndPoint)
SctpTransport.GetCookie(SctpPacket)
SctpTransport.GetCookieHMAC(Byte[])
SctpTransport.Initialize(UInt16)
SctpTransport.Associate(IPAddress, Int32)
SctpTransport.Shutdown(String)
SctpTransport.Abort(String)
SctpTransport.Send(String, Byte[], Int32, Int32, Int32, Int32)
SctpTransport.SetPrimary(String)
SctpTransport.Receive(String, Byte[], Int32, Int32)
SctpTransport.Status(String)
SctpTransport.ChangeHeartbeat(String, Int32)
SctpTransport.RequestHeartbeat(String)
SctpTransport.GetSrttReport(String)
SctpTransport.SetProtocolParameters(String, Object)
SctpTransport.ReceiveUnsent(String, Byte[], Int32, Int32)
SctpTransport.ReceiveUnacknowledged(String, Byte[], Int32, Int32)
SctpTransport.Destroy(String)
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: SIPSorcery.Net
Assembly: SIPSorcery.dll
Syntax
public class RTCSctpTransport : SctpTransport
Remarks

DTLS encapsulation of SCTP: https://tools.ietf.org/html/rfc8261

WebRTC API RTCSctpTransport Interface definition: https://www.w3.org/TR/webrtc/#webidl-1410933428

Constructors

| Improve this Doc View Source

RTCSctpTransport(UInt16, UInt16, Int32)

Creates a new SCTP transport that runs on top of an established DTLS connection.

Declaration
public RTCSctpTransport(ushort sourcePort, ushort destinationPort, int dtlsPort)
Parameters
Type Name Description
System.UInt16 sourcePort

The SCTP source port.

System.UInt16 destinationPort

The SCTP destination port.

System.Int32 dtlsPort

Optional. The local UDP port being used for the DTLS connection. This will be set on the SCTP association to aid in diagnostics.

Fields

| Improve this Doc View Source

maxChannels

The maximum number of data channel's that can be used simultaneously (where each data channel is a stream on the same SCTP association).

Declaration
public readonly ushort maxChannels
Field Value
Type Description
System.UInt16

Properties

| Improve this Doc View Source

IsDtlsClient

Indicates the role of this peer in the DTLS connection. This influences the selection of stream ID's for SCTP messages.

Declaration
public bool IsDtlsClient { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

IsPortAgnostic

The SCTP ports are redundant for a DTLS transport. There will only ever be one SCTP association so the SCTP ports do not need to be used for end point matching.

Declaration
public override bool IsPortAgnostic { get; }
Property Value
Type Description
System.Boolean
Overrides
SctpTransport.IsPortAgnostic
| Improve this Doc View Source

maxMessageSize

The maximum size of data that can be passed to RTCDataChannel's send() method.

Declaration
public uint maxMessageSize { get; }
Property Value
Type Description
System.UInt32
Remarks

See https://www.w3.org/TR/webrtc/#sctp-transport-update-mms.

| Improve this Doc View Source

RTCSctpAssociation

Declaration
public RTCPeerSctpAssociation RTCSctpAssociation { get; }
Property Value
Type Description
RTCPeerSctpAssociation
| Improve this Doc View Source

state

The current state of the SCTP transport.

Declaration
public RTCSctpTransportState state { get; }
Property Value
Type Description
RTCSctpTransportState
| Improve this Doc View Source

transport

The transport over which all SCTP packets for data channels will be sent and received.

Declaration
public DatagramTransport transport { get; }
Property Value
Type Description
Org.BouncyCastle.Crypto.Tls.DatagramTransport

Methods

| Improve this Doc View Source

Associate()

Attempts to create and initialise a new SCTP association with the remote party.

Declaration
public void Associate()
| Improve this Doc View Source

Close()

Closes the SCTP association and stops the receive thread.

Declaration
public void Close()
| Improve this Doc View Source

GetInitAckCookie(UInt16, UInt16, UInt32, UInt32, UInt32, String, Int32)

Gets a cookie to send in an INIT ACK chunk. This SCTP transport for a WebRTC peer connection needs to use the same local tag and TSN in every chunk as only a single association is ever maintained.

Declaration
protected override SctpTransportCookie GetInitAckCookie(ushort sourcePort, ushort destinationPort, uint remoteTag, uint remoteTSN, uint remoteARwnd, string remoteEndPoint, int lifeTimeExtension = 0)
Parameters
Type Name Description
System.UInt16 sourcePort
System.UInt16 destinationPort
System.UInt32 remoteTag
System.UInt32 remoteTSN
System.UInt32 remoteARwnd
System.String remoteEndPoint
System.Int32 lifeTimeExtension
Returns
Type Description
SctpTransportCookie
Overrides
SctpTransport.GetInitAckCookie(UInt16, UInt16, UInt32, UInt32, UInt32, String, Int32)
| Improve this Doc View Source

Send(String, Byte[], Int32, Int32)

This method is called by the SCTP association when it wants to send an SCTP packet to the remote party.

Declaration
public override void Send(string associationID, byte[] buffer, int offset, int length)
Parameters
Type Name Description
System.String associationID

Not used for the DTLS transport.

System.Byte[] buffer

The buffer containing the data to send.

System.Int32 offset

The position in the buffer to send from.

System.Int32 length

The number of bytes to send.

Overrides
SctpTransport.Send(String, Byte[], Int32, Int32)
| Improve this Doc View Source

Start(DatagramTransport, Boolean)

Starts the SCTP transport receive thread.

Declaration
public void Start(DatagramTransport dtlsTransport, bool isDtlsClient)
Parameters
Type Name Description
Org.BouncyCastle.Crypto.Tls.DatagramTransport dtlsTransport
System.Boolean isDtlsClient
| Improve this Doc View Source

UpdateDestinationPort(UInt16)

Attempts to update the SCTP destination port the association managed by this transport will use.

Declaration
public void UpdateDestinationPort(ushort port)
Parameters
Type Name Description
System.UInt16 port

The updated destination port.

| Improve this Doc View Source

UpdateSourcePort(UInt16)

Attempts to update the SCTP source port the association managed by this transport will use.

Declaration
public void UpdateSourcePort(ushort port)
Parameters
Type Name Description
System.UInt16 port

The updated source port.

Events

| Improve this Doc View Source

OnStateChanged

Event for notifications about changes to the SCTP transport state.

Declaration
public event Action<RTCSctpTransportState> OnStateChanged
Event Type
Type Description
System.Action<RTCSctpTransportState>

Extension Methods

JSONWriter.ToJson(Object)
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX