mirror of
https://github.com/shtorm-7/sing-box-extended.git
synced 2026-07-28 01:31:51 +03:00
Add admin panel, manager, node_manager, bandwidth limiter, connection limiter, bonding, failover, vless encryption, mkcp transport
This commit is contained in:
29
transport/v2raykcp/errors.go
Normal file
29
transport/v2raykcp/errors.go
Normal file
@@ -0,0 +1,29 @@
|
||||
package v2raykcp
|
||||
|
||||
import "errors"
|
||||
|
||||
var (
|
||||
// ErrIOTimeout is returned when I/O operation times out
|
||||
ErrIOTimeout = errors.New("i/o timeout")
|
||||
// ErrClosedListener is returned when listener is closed
|
||||
ErrClosedListener = errors.New("listener closed")
|
||||
// ErrClosedConnection is returned when connection is closed
|
||||
ErrClosedConnection = errors.New("connection closed")
|
||||
)
|
||||
|
||||
func newError(values ...interface{}) error {
|
||||
return errors.New(toString(values...))
|
||||
}
|
||||
|
||||
func toString(values ...interface{}) string {
|
||||
result := ""
|
||||
for _, value := range values {
|
||||
switch v := value.(type) {
|
||||
case string:
|
||||
result += v
|
||||
case error:
|
||||
result += v.Error()
|
||||
}
|
||||
}
|
||||
return result
|
||||
}
|
||||
Reference in New Issue
Block a user