mirror of
https://github.com/aler9/gortsplib
synced 2025-10-05 07:06:58 +08:00
implement client TLS support
This commit is contained in:
10
server.go
10
server.go
@@ -24,10 +24,12 @@ func (s *Server) Accept() (*ServerConn, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
conn := nconn
|
||||
if s.conf.TLSConfig != nil {
|
||||
conn = tls.Server(conn, s.conf.TLSConfig)
|
||||
}
|
||||
conn := func() net.Conn {
|
||||
if s.conf.TLSConfig != nil {
|
||||
return tls.Server(nconn, s.conf.TLSConfig)
|
||||
}
|
||||
return nconn
|
||||
}()
|
||||
|
||||
return &ServerConn{
|
||||
s: s,
|
||||
|
Reference in New Issue
Block a user