Files
netris-nestri/packages/relay/main.go
Wanjohi 379db1c87b feat: Add streaming support (#125)
This adds:
- [x] Keyboard and mouse handling on the frontend
- [x] Video and audio streaming from the backend to the frontend
- [x] Input server that works with Websockets

Update - 17/11
- [ ] Master docker container to run this
- [ ] Steam runtime
- [ ] Entrypoint.sh

---------

Co-authored-by: Kristian Ollikainen <14197772+DatCaptainHorse@users.noreply.github.com>
Co-authored-by: Kristian Ollikainen <DatCaptainHorse@users.noreply.github.com>
2024-12-08 14:54:56 +03:00

33 lines
553 B
Go

package main
import (
"log"
"os"
"os/signal"
relay "relay/internal"
"syscall"
)
func main() {
var err error
stopCh := make(chan os.Signal, 1)
signal.Notify(stopCh, os.Interrupt, syscall.SIGTERM)
// Get flags and log them
relay.InitFlags()
relay.GetFlags().DebugLog()
// Init WebRTC API
err = relay.InitWebRTCAPI()
if err != nil {
log.Fatal("Failed to initialize WebRTC API: ", err)
}
// Start our HTTP endpoints
relay.InitHTTPEndpoint()
// Wait for exit signal
<-stopCh
log.Println("Shutting down gracefully by signal...")
}