10 Star 38 Fork 19

Gitee 极速下载 / Pion-WebRTC

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/pion/webrtc
克隆/下载
rtcicecredentialtype.go 1.16 KB
一键复制 编辑 原始数据 按行查看 历史
package webrtc
// RTCIceCredentialType indicates the type of credentials used to connect to
// an ICE server.
type RTCIceCredentialType int
const (
// RTCIceCredentialTypePassword describes username and pasword based
// credentials as described in https://tools.ietf.org/html/rfc5389.
RTCIceCredentialTypePassword RTCIceCredentialType = iota + 1
// RTCIceCredentialTypeOauth describes token based credential as described
// in https://tools.ietf.org/html/rfc7635.
RTCIceCredentialTypeOauth
)
// This is done this way because of a linter.
const (
rtcIceCredentialTypePasswordStr = "password"
rtcIceCredentialTypeOauthStr = "oauth"
)
func newRTCIceCredentialType(raw string) RTCIceCredentialType {
switch raw {
case rtcIceCredentialTypePasswordStr:
return RTCIceCredentialTypePassword
case rtcIceCredentialTypeOauthStr:
return RTCIceCredentialTypeOauth
default:
return RTCIceCredentialType(Unknown)
}
}
func (t RTCIceCredentialType) String() string {
switch t {
case RTCIceCredentialTypePassword:
return rtcIceCredentialTypePasswordStr
case RTCIceCredentialTypeOauth:
return rtcIceCredentialTypeOauthStr
default:
return ErrUnknownType.Error()
}
}
1
https://gitee.com/mirrors/Pion-WebRTC.git
git@gitee.com:mirrors/Pion-WebRTC.git
mirrors
Pion-WebRTC
Pion-WebRTC
v1.1.1

搜索帮助