Files
ice/candidatepair_state.go
Sebastian Waisbrot 953f36f07f Add config to run Agent in Lite mode
Allow the agent to run in Lite mode. This is useful in
cases where you never want connectivity checks, and reduces
possible attacks surfaces when you have a public IP.
2019-09-02 16:13:08 -07:00

38 lines
1.0 KiB
Go

package ice
// CandidatePairState represent the ICE candidate pair state
type CandidatePairState int
const (
// CandidatePairStateWaiting means a check has not been performed for
// this pair
CandidatePairStateWaiting = iota + 1
// CandidatePairStateInProgress means a check has been sent for this pair,
// but the transaction is in progress.
CandidatePairStateInProgress
// CandidatePairStateFailed means a check for this pair was already done
// and failed, either never producing any response or producing an unrecoverable
// failure response.
CandidatePairStateFailed
// CandidatePairStateSucceeded means a check for this pair was already
// done and produced a successful result.
CandidatePairStateSucceeded
)
func (c CandidatePairState) String() string {
switch c {
case CandidatePairStateWaiting:
return "waiting"
case CandidatePairStateInProgress:
return "in-progress"
case CandidatePairStateFailed:
return "failed"
case CandidatePairStateSucceeded:
return "succeeded"
}
return "Unknown candidate pair state"
}