summaryrefslogtreecommitdiff
path: root/vendor/github.com/pion/turn/v2/internal/client/errors.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/pion/turn/v2/internal/client/errors.go')
-rw-r--r--vendor/github.com/pion/turn/v2/internal/client/errors.go37
1 files changed, 37 insertions, 0 deletions
diff --git a/vendor/github.com/pion/turn/v2/internal/client/errors.go b/vendor/github.com/pion/turn/v2/internal/client/errors.go
new file mode 100644
index 0000000..2d4bd30
--- /dev/null
+++ b/vendor/github.com/pion/turn/v2/internal/client/errors.go
@@ -0,0 +1,37 @@
+package client
+
+import (
+ "errors"
+)
+
+var (
+ errFakeErr = errors.New("fake error")
+ errTryAgain = errors.New("try again")
+ errClosed = errors.New("use of closed network connection")
+ errUDPAddrCast = errors.New("addr is not a net.UDPAddr")
+ errAlreadyClosed = errors.New("already closed")
+ errDoubleLock = errors.New("try-lock is already locked")
+ errTransactionClosed = errors.New("transaction closed")
+ errWaitForResultOnNonResultTransaction = errors.New("WaitForResult called on non-result transaction")
+ errFailedToBuildRefreshRequest = errors.New("failed to build refresh request")
+ errFailedToRefreshAllocation = errors.New("failed to refresh allocation")
+ errFailedToGetLifetime = errors.New("failed to get lifetime from refresh response")
+)
+
+type timeoutError struct {
+ msg string
+}
+
+func newTimeoutError(msg string) error {
+ return &timeoutError{
+ msg: msg,
+ }
+}
+
+func (e *timeoutError) Error() string {
+ return e.msg
+}
+
+func (e *timeoutError) Timeout() bool {
+ return true
+}