forked from pion/webrtc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
icegathererstate.go
36 lines (30 loc) · 999 Bytes
/
icegathererstate.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package webrtc
// ICEGathererState represents the current state of the ICE gatherer.
type ICEGathererState byte
const (
// ICEGathererStateNew indicates object has been created but
// gather() has not been called.
ICEGathererStateNew ICEGathererState = iota + 1
// ICEGathererStateGathering indicates gather() has been called,
// and the ICEGatherer is in the process of gathering candidates.
ICEGathererStateGathering
// ICEGathererStateComplete indicates the ICEGatherer has completed gathering.
ICEGathererStateComplete
// ICEGathererStateClosed indicates the closed state can only be entered
// when the ICEGatherer has been closed intentionally by calling close().
ICEGathererStateClosed
)
func (s ICEGathererState) String() string {
switch s {
case ICEGathererStateNew:
return "new"
case ICEGathererStateGathering:
return "gathering"
case ICEGathererStateComplete:
return "complete"
case ICEGathererStateClosed:
return "closed"
default:
return unknownStr
}
}