Source File
icegatheringstate.go
Belonging Package
github.com/pion/webrtc/v4
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>// SPDX-License-Identifier: MITpackage webrtc// ICEGatheringState describes the state of the candidate gathering process.type ICEGatheringState intconst (// ICEGatheringStateUnknown is the enum's zero-value.ICEGatheringStateUnknown ICEGatheringState = iota// ICEGatheringStateNew indicates that any of the ICETransports are// in the "new" gathering state and none of the transports are in the// "gathering" state, or there are no transports.ICEGatheringStateNew// ICEGatheringStateGathering indicates that any of the ICETransports// are in the "gathering" state.ICEGatheringStateGathering// ICEGatheringStateComplete indicates that at least one ICETransport// exists, and all ICETransports are in the "completed" gathering state.ICEGatheringStateComplete)// This is done this way because of a linter.const (iceGatheringStateNewStr = "new"iceGatheringStateGatheringStr = "gathering"iceGatheringStateCompleteStr = "complete")// NewICEGatheringState takes a string and converts it to ICEGatheringState.func ( string) ICEGatheringState {switch {case iceGatheringStateNewStr:return ICEGatheringStateNewcase iceGatheringStateGatheringStr:return ICEGatheringStateGatheringcase iceGatheringStateCompleteStr:return ICEGatheringStateCompletedefault:return ICEGatheringStateUnknown}}func ( ICEGatheringState) () string {switch {case ICEGatheringStateNew:return iceGatheringStateNewStrcase ICEGatheringStateGathering:return iceGatheringStateGatheringStrcase ICEGatheringStateComplete:return iceGatheringStateCompleteStrdefault:return ErrUnknownType.Error()}}
![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |