implement server TLS support (RTSPS)

This commit is contained in:
aler9
2020-12-13 19:18:15 +01:00
parent c11f056530
commit aaae3b45a7
7 changed files with 334 additions and 35 deletions

View File

@@ -1,6 +1,7 @@
package gortsplib
import (
"crypto/tls"
"net"
"time"
)
@@ -16,6 +17,9 @@ func Serve(address string) (*Server, error) {
// ServerConf allows to configure a Server.
// All fields are optional.
type ServerConf struct {
// a TLS configuration to accept TLS (RTSPS) connections.
TLSConfig *tls.Config
// timeout of read operations.
// It defaults to 10 seconds
ReadTimeout time.Duration