add bitrix support
This commit is contained in:
1 parent
747f8f2312
commit
5690cf58a9
62 files changed
+4098
-1053
No files matched your search
@@ -0,0 +1,30 @@
|
||||
package tunnel
|
||||
|
||||
import (
|
||||
"github.com/pion/webrtc/v4"
|
||||
"whitelist-bypass/relay/common"
|
||||
)
|
||||
|
||||
func DrainSenderRTCP(sender *webrtc.RTPSender) {
|
||||
if sender == nil {
|
||||
return
|
||||
}
|
||||
buf := make([]byte, 1500)
|
||||
for {
|
||||
if _, _, err := sender.Read(buf); err != nil {
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func DrainTrack(track *webrtc.TrackRemote) {
|
||||
if track == nil {
|
||||
return
|
||||
}
|
||||
buf := make([]byte, common.UDPBufSize)
|
||||
for {
|
||||
if _, _, err := track.Read(buf); err != nil {
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user