datachannelinit.go 1.4 KB

123456789101112131415161718192021222324252627282930313233343536
  1. // SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
  2. // SPDX-License-Identifier: MIT
  3. package webrtc
  4. // DataChannelInit can be used to configure properties of the underlying
  5. // channel such as data reliability.
  6. type DataChannelInit struct {
  7. // Ordered indicates if data is allowed to be delivered out of order. The
  8. // default value of true, guarantees that data will be delivered in order.
  9. Ordered *bool
  10. // MaxPacketLifeTime limits the time (in milliseconds) during which the
  11. // channel will transmit or retransmit data if not acknowledged. This value
  12. // may be clamped if it exceeds the maximum value supported.
  13. MaxPacketLifeTime *uint16
  14. // MaxRetransmits limits the number of times a channel will retransmit data
  15. // if not successfully delivered. This value may be clamped if it exceeds
  16. // the maximum value supported.
  17. MaxRetransmits *uint16
  18. // Protocol describes the subprotocol name used for this channel.
  19. Protocol *string
  20. // Negotiated describes if the data channel is created by the local peer or
  21. // the remote peer. The default value of false tells the user agent to
  22. // announce the channel in-band and instruct the other peer to dispatch a
  23. // corresponding DataChannel. If set to true, it is up to the application
  24. // to negotiate the channel and create an DataChannel with the same id
  25. // at the other peer.
  26. Negotiated *bool
  27. // ID overrides the default selection of ID for this channel.
  28. ID *uint16
  29. }