mirror of
https://github.com/nestriness/nestri.git
synced 2025-12-12 16:55:37 +02:00
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>
33 lines
553 B
Go
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...")
|
|
}
|