# RTCSctpTransport

The SCTP transport that data channels go over.

### *class* webrtc.interfaces.rtc_sctp_transport.RTCSctpTransport(native_obj=None)

The SCTP transport the data channels of a [`webrtc.RTCPeerConnection`](rtc_peer_connection.md#webrtc.interfaces.rtc_peer_connection.RTCPeerConnection) share.

It reports the negotiated limits of the data channels, and the DTLS transport its packets go over.

See [MDN: RTCSctpTransport](https://developer.mozilla.org/en-US/docs/Web/API/RTCSctpTransport).

* **Events:**
  **statechange** ([`webrtc.Event`](../models/events.md#webrtc.models.events.Event)) – [`state`](#webrtc.interfaces.rtc_sctp_transport.RTCSctpTransport.state) changed.

### Events

- `statechange`: [`Event`](../models/events.md#webrtc.models.events.Event)

Handlers are registered with [`on()`](../events.md#webrtc.utils.events.UniformEventTarget.on).

#### *property* transport *: [RTCDtlsTransport](rtc_dtls_transport.md#webrtc.interfaces.rtc_dtls_transport.RTCDtlsTransport)*

The DTLS transport the SCTP packets go over.

See [MDN: RTCSctpTransport/transport](https://developer.mozilla.org/en-US/docs/Web/API/RTCSctpTransport/transport).

* **Type:**
  [`webrtc.RTCDtlsTransport`](rtc_dtls_transport.md#webrtc.interfaces.rtc_dtls_transport.RTCDtlsTransport)

#### *property* state *: [RTCSctpTransportState](../enums.md#webrtc.enums.RTCSctpTransportState)*

Whether the SCTP association is connecting, connected or closed.

See [MDN: RTCSctpTransport/state](https://developer.mozilla.org/en-US/docs/Web/API/RTCSctpTransport/state).

* **Type:**
  [`webrtc.RTCSctpTransportState`](../enums.md#webrtc.enums.RTCSctpTransportState)

#### *property* max_message_size *: [float](https://docs.python.org/3/builtins/functions.html#float) | [None](https://docs.python.org/3/builtins/constants.html#None)*

The largest message in bytes [`webrtc.RTCDataChannel.send()`](rtc_data_channel.md#webrtc.interfaces.rtc_data_channel.RTCDataChannel.send) accepts.

It’s `math.inf` when there’s no limit and [`None`](https://docs.python.org/3/builtins/constants.html#None) while it isn’t known.

See [MDN: RTCSctpTransport/maxMessageSize](https://developer.mozilla.org/en-US/docs/Web/API/RTCSctpTransport/maxMessageSize).

* **Type:**
  [`float`](https://docs.python.org/3/builtins/functions.html#float), optional

#### *property* max_channels *: [int](https://docs.python.org/3/builtins/functions.html#int) | [None](https://docs.python.org/3/builtins/constants.html#None)*

How many data channels can be open at once.

It’s [`None`](https://docs.python.org/3/builtins/constants.html#None) until the transport is connected.
See [MDN: RTCSctpTransport/maxChannels](https://developer.mozilla.org/en-US/docs/Web/API/RTCSctpTransport/maxChannels).

* **Type:**
  [`int`](https://docs.python.org/3/builtins/functions.html#int), optional
