mirror of
https://github.com/pion/webrtc.git
synced 2025-10-08 00:20:16 +08:00
Re-organize CreateDataChannel function and add limited spec compliance
This commit is contained in:
@@ -5,8 +5,7 @@ package webrtc
|
||||
type RTCDataChannelInit struct {
|
||||
// Ordered indicates if data is allowed to be delivered out of order. The
|
||||
// default value of true, guarantees that data will be delivered in order.
|
||||
// TODO make sure defaults to true
|
||||
Ordered bool
|
||||
Ordered *bool
|
||||
|
||||
// MaxPacketLifeTime limits the time (in milliseconds) during which the
|
||||
// channel will transmit or retransmit data if not acknowledged. This value
|
||||
@@ -19,7 +18,7 @@ type RTCDataChannelInit struct {
|
||||
MaxRetransmits *uint16
|
||||
|
||||
// Protocol describes the subprotocol name used for this channel.
|
||||
Protocol string
|
||||
Protocol *string
|
||||
|
||||
// Negotiated describes if the data channel is created by the local peer or
|
||||
// the remote peer. The default value of false tells the user agent to
|
||||
@@ -27,11 +26,11 @@ type RTCDataChannelInit struct {
|
||||
// corresponding RTCDataChannel. If set to true, it is up to the application
|
||||
// to negotiate the channel and create an RTCDataChannel with the same id
|
||||
// at the other peer.
|
||||
Negotiated bool
|
||||
Negotiated *bool
|
||||
|
||||
// ID overrides the default selection of ID for this channel.
|
||||
ID uint16
|
||||
ID *uint16
|
||||
|
||||
// Priority describes the priority of this channel.
|
||||
Priority RTCPriorityType
|
||||
Priority *RTCPriorityType
|
||||
}
|
||||
|
Reference in New Issue
Block a user