Обработка ICE

This commit is contained in:
set
2026-03-14 18:44:19 +02:00
parent f264bdf67f
commit 1d8474265a
2 changed files with 40 additions and 22 deletions

25
main.go
View File

@@ -1,27 +1,8 @@
package main
import (
"g365sfu/logger"
"g365sfu/sfu"
"g365sfu/socket"
"net/http"
"os"
"github.com/joho/godotenv"
)
import "g365sfu/boot"
func main() {
godotenv.Load()
sfu.InitWebRTCEngines()
if os.Getenv("SECRET") == "" {
logger.LogErrorMessage("server failed to start because not set secret key in .env variables")
return
}
http.HandleFunc("/", socket.HandleWebSocket)
port := os.Getenv("PORT")
if port == "" {
port = "1001"
}
logger.LogInfoMessage("server started at x.x.x.x:" + port)
http.ListenAndServe(":"+port, nil)
// Инициализация и запуск SFU сервера
boot.Bootstrap()
}