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:
@@ -2,7 +2,6 @@ package ssdp
|
||||
|
||||
import (
|
||||
"log"
|
||||
"net"
|
||||
"time"
|
||||
|
||||
"github.com/koron/go-ssdp"
|
||||
@@ -32,12 +31,3 @@ func AnnounceRenderer(usn, location string) {
|
||||
// Un jour on voudra faire ça à l'arrêt :
|
||||
// adv.Close() // envoie le ssdp:byebye
|
||||
}
|
||||
func GetLocalIP() string {
|
||||
conn, err := net.Dial("udp", "239.255.255.250:1900")
|
||||
if err != nil {
|
||||
return "127.0.0.1"
|
||||
}
|
||||
defer conn.Close()
|
||||
localAddr := conn.LocalAddr().(*net.UDPAddr)
|
||||
return localAddr.IP.String()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user