client: allow to call client.Close() always

This commit is contained in:
aler9
2021-05-10 17:18:41 +02:00
parent 034eee1c8a
commit f8ef945dae
8 changed files with 1019 additions and 745 deletions

View File

@@ -6,6 +6,14 @@ import (
"github.com/aler9/gortsplib/pkg/base"
)
// ErrClientTerminated is an error that can be returned by a client.
type ErrClientTerminated struct{}
// Error implements the error interface.
func (e ErrClientTerminated) Error() string {
return "terminated"
}
// ErrClientWrongState is an error that can be returned by a client.
type ErrClientWrongState struct {
AllowedList []fmt.Stringer