github.com/pion/webrtc/v3@v3.2.24/datachannelinit.go (about)

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