Changes to be committed:
modified: cmd/pmomusic/main.go new file: internal/netutils/ip_detect.go new file: internal/netutils/list_all_ip.go modified: internal/soap/soap.go modified: internal/ssdp/responder.go modified: internal/ssdp/ssdp.go modified: internal/upnp/http.go new file: internal/upnp/server.go new file: internal/upnp/xml/AVTransport.xml new file: internal/upnp/xml/ConnectionManager.xml new file: internal/upnp/xml/RenderingControl.xml
This commit is contained in:
@@ -3,12 +3,18 @@ package main
|
||||
import (
|
||||
"log"
|
||||
|
||||
"gargoton.petite-maison-orange.fr/eric/pmomusic/internal/netutils"
|
||||
"gargoton.petite-maison-orange.fr/eric/pmomusic/internal/ssdp"
|
||||
"gargoton.petite-maison-orange.fr/eric/pmomusic/internal/upnp"
|
||||
)
|
||||
|
||||
func main() {
|
||||
localIP := ssdp.GetLocalIP()
|
||||
localIP, err := netutils.GuessLocalIP()
|
||||
|
||||
if err != nil {
|
||||
log.Fatalf("Could not guess local IP: %v", err)
|
||||
}
|
||||
|
||||
location := "http://" + localIP + ":1400/description.xml"
|
||||
usn := "uuid:pmomusic-renderer-001"
|
||||
|
||||
@@ -18,5 +24,5 @@ func main() {
|
||||
|
||||
// Lance le serveur HTTP
|
||||
log.Println("Starting HTTP server at:", location)
|
||||
upnp.StartHTTPServer(usn)
|
||||
upnp.StartHTTPServer(usn, localIP, 1400)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user