Files
webrtc/dtlsrole.go
Max Hawkins 0647ce9c26 Remove rtc prefix from filenames
Relates to #408
2019-02-17 16:22:56 -08:00

31 lines
661 B
Go

package webrtc
// DTLSRole indicates the role of the DTLS transport.
type DTLSRole byte
const (
// DTLSRoleAuto defines the DLTS role is determined based on
// the resolved ICE role: the ICE controlled role acts as the DTLS
// client and the ICE controlling role acts as the DTLS server.
DTLSRoleAuto DTLSRole = iota + 1
// DTLSRoleClient defines the DTLS client role.
DTLSRoleClient
// DTLSRoleServer defines the DTLS server role.
DTLSRoleServer
)
func (r DTLSRole) String() string {
switch r {
case DTLSRoleAuto:
return "auto"
case DTLSRoleClient:
return "client"
case DTLSRoleServer:
return "server"
default:
return unknownStr
}
}