1
0
mirror of https://gitlab.crans.org/nounous/ghostream.git synced 2024-12-23 01:32:19 +00:00

Do not use file mode for SRT

This commit is contained in:
Alexandre Iooss 2020-10-04 11:25:55 +02:00
parent 97ac6f370d
commit 3f5d317250
No known key found for this signature in database
GPG Key ID: 6C79278F3FCDCC02

View File

@ -45,16 +45,12 @@ func splitHostPort(hostport string) (string, uint16) {
// Serve SRT server // Serve SRT server
func Serve(cfg *Options, authBackend auth.Backend, forwardingChannel chan Packet) { func Serve(cfg *Options, authBackend auth.Backend, forwardingChannel chan Packet) {
// Start SRT in listen mode // Start SRT in listening mode
log.Printf("SRT server listening on %s", cfg.ListenAddress) log.Printf("SRT server listening on %s", cfg.ListenAddress)
host, port := splitHostPort(cfg.ListenAddress) host, port := splitHostPort(cfg.ListenAddress)
options := map[string]string{ sck := srtgo.NewSrtSocket(host, port, nil)
"transtype": "file",
"mode": "listener",
}
sck := srtgo.NewSrtSocket(host, port, options)
if err := sck.Listen(cfg.MaxClients); err != nil { if err := sck.Listen(cfg.MaxClients); err != nil {
log.Fatal("Unable to listen to SRT clients:", err) log.Fatal("Unable to listen for SRT clients:", err)
} }
// FIXME: Get the stream type // FIXME: Get the stream type