直播:后台 JWT 推流、前台画中画;WebRTC 服务与 Nginx WebSocket 代理
Made-with: Cursor
This commit is contained in:
30
server/vendor/github.com/pion/webrtc/v3/icemux.go
generated
vendored
Normal file
30
server/vendor/github.com/pion/webrtc/v3/icemux.go
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
package webrtc
|
||||
|
||||
import (
|
||||
"net"
|
||||
|
||||
"github.com/pion/ice/v2"
|
||||
"github.com/pion/logging"
|
||||
)
|
||||
|
||||
// NewICETCPMux creates a new instance of ice.TCPMuxDefault. It enables use of
|
||||
// passive ICE TCP candidates.
|
||||
func NewICETCPMux(logger logging.LeveledLogger, listener net.Listener, readBufferSize int) ice.TCPMux {
|
||||
return ice.NewTCPMuxDefault(ice.TCPMuxParams{
|
||||
Listener: listener,
|
||||
Logger: logger,
|
||||
ReadBufferSize: readBufferSize,
|
||||
})
|
||||
}
|
||||
|
||||
// NewICEUDPMux creates a new instance of ice.UDPMuxDefault. It allows many PeerConnections to be served
|
||||
// by a single UDP Port.
|
||||
func NewICEUDPMux(logger logging.LeveledLogger, udpConn net.PacketConn) ice.UDPMux {
|
||||
return ice.NewUDPMuxDefault(ice.UDPMuxParams{
|
||||
UDPConn: udpConn,
|
||||
Logger: logger,
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user