Bonsoir
Bonsoir copied to clipboard
Can't get ip address from discovery service
Hi
I have a problem with discovery services with this plugin. If I use Debug, I see all attributes of discoveredServices, but if I try to get ip I can't. If Try to save this to variable with var ipAddress = discoveredServices[0].ip I can't use, but can use name, type, port and attributes, but can't use ip.
I don't know if this is a bug or not. Why? Can help me? Thanks.
Hi, marco-1988
Is type of discoveredService ResolvedBonsoirService? if it is BonsoirService, don't have ip.
check it please. Or, can you look at the code ?
Try
var service = event.service as ResolvedBonsoirService;
Then you can access service.ip
Hi @RyoheiTomiyama , This plugin works great. Thanks for providing this plugin. In my case i am facing different issue. When service has two ip address, i am not able to pick the right one. Example
service -> 169.254.180.80 -> 192.168.29.10 Here i am expecting second one. but it is giving the first ip always.
Hi, @sureace .
I'm sorry, but I'm not an administrator. I'm also a user. I agree that this plugin is great.
As for your question, 192.168.*. *
is a private IP.
If Discovery and Broadcast are connected to the same network, I think you can get 192.168.*.*
.
@sureace you might be interested in https://github.com/Skyost/Bonsoir/pull/35/files