koron / go-ssdp

SSDP library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to send search responses?

andig opened this issue · comments

commented

Implementing the monitor endpoint, I need to response to search requests. The search responses are similar to NOTIFY messages, but must contain ST instead of NT. I couldn't figure out how to send these responses using this package?

UPDATE refers to https://tools.ietf.org/html/draft-cai-ssdp-v1-03#page-10

commented

@koron if you would accept a PR I'd be happy to implement this. Just need to understand if that's in line with your plans as I'm new to SSDP.

commented

I've just realised that using the Advertiser, the search responses are actually being sent: https://github.com/koron/go-ssdp/blob/master/advertise.go#L39. So to be in line with announce and byebye all that's needed would be the ability to send these standalone.

i have merged #14.
does it work for you, enough?

commented

Thats perfekt for my purposes, thank you!