A library that implements the client side of SSDP (Simple Service Discovery Protocol).
This is an altered version from the original by Ben Curren.
Build with ❤️ by
Oleaintueri is sponsoring the development and maintenance of this project within their organisation.
GOMODULE111=on go get github.com/Oleaintueri/gossdp
package main
import (
"fmt"
"github.com/Oleaintueri/gossdp"
"github.com/Oleaintueri/gossdp/pkg/ssdp"
"time"
)
func main() {
ssdpClient := ssdp.NewSSDP(ssdp.WithTimeout(1000))
// Get the devices on the network directly
devices, err := ssdpClient.SearchDevices("upnp:rootdevice")
if err != nil {
panic(err)
}
// Get the general responses on the network
responses, err := ssdpClient.Search("upnp:rootdevice")
if err != nil {
panic(err)
}
for _, device := range devices {
fmt.Printf("Device: %v", device)
}
for _, resp := range responses {
fmt.Printf("Response: %v", resp)
}
}
- Fork the repository
- Create an issue with your desired update
- Write tests and code
- Submit a pull request