datachannelinit.go 1.3 KB

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