rename ServerConf into Server

This commit is contained in:
aler9
2021-04-25 18:38:46 +02:00
committed by Alessandro Ros
parent c1cd32257f
commit 35705a86ac
10 changed files with 218 additions and 238 deletions

View File

@@ -151,15 +151,16 @@ func main() {
if err != nil {
panic(err)
}
conf := gortsplib.ServerConf{
TLSConfig: &tls.Config{Certificates: []tls.Certificate{cert}},
}
// create server
s, err := conf.Serve(":8554")
s := &gortsplib.Server{
TLSConfig: &tls.Config{Certificates: []tls.Certificate{cert}},
}
err = s.Serve(":8554")
if err != nil {
panic(err)
}
log.Printf("server is ready")
// accept connections