BIG core logic rewrite

This commit is contained in:
Alexey Khit
2023-03-17 06:48:02 +03:00
parent 2146ea470b
commit 12a7b96289
107 changed files with 3000 additions and 3024 deletions

View File

@@ -8,6 +8,9 @@ import (
"strings"
)
// ReceiveMTU = Ethernet MTU (1500) - IP Header (20) - UDP Header (8)
const ReceiveMTU = 1472
func NewAPI(address string) (*webrtc.API, error) {
// for debug logs add to env: `PION_LOG_DEBUG=all`
m := &webrtc.MediaEngine{}
@@ -41,8 +44,7 @@ func NewAPI(address string) (*webrtc.API, error) {
// fix https://github.com/pion/webrtc/pull/2407
s.SetDTLSInsecureSkipHelloVerify(true)
// Ethernet MTU (1500) - IP Header (20) - UDP Header (8)
s.SetReceiveMTU(1472)
s.SetReceiveMTU(ReceiveMTU)
if address != "" {
address, network, _ := strings.Cut(address, "/")