Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to get the port of a service? #109

Open
umlaeute opened this issue Mar 7, 2023 · 0 comments · May be fixed by #110
Open

how to get the port of a service? #109

umlaeute opened this issue Mar 7, 2023 · 0 comments · May be fixed by #110

Comments

@umlaeute
Copy link

umlaeute commented Mar 7, 2023

now that i've started digging into Servus, it turns out that you cannot discover the port of a service.

e.g. in avahi.h, the uint16_t field which denotes the service port is simply unused:

static void _resolveCBS(AvahiServiceResolver* resolver, AvahiIfIndex,
AvahiProtocol, AvahiResolverEvent event,
const char* name, const char*, const char*,
const char* host, const AvahiAddress*, uint16_t,
AvahiStringList* txt, AvahiLookupResultFlags flags,
void* servus)

now i'm not an expert when it comes to ZeroConf, but in my understanding the port information is crucial for service discovery (at least this is what i gather than you always must provide a port when announcing a service; also, i don't know how one would actually reach a service without knowing both the host-address and the port).

have i been misusing Zeroconf, or is this just a weird omittance?

I'd suggest using the servus_port key for this information (though i admit i wonder why Servus would reserve any key (e.g. servus_host) for private use for obligatory information (like host-address, host-port, service-name and service-type))

umlaeute added a commit to umlaeute/Servus that referenced this issue Mar 7, 2023
the port information is stored in 'servus_port' (as a string)

Closes: HBPVIS#109
@umlaeute umlaeute linked a pull request Mar 7, 2023 that will close this issue
umlaeute added a commit to umlaeute/Servus that referenced this issue Mar 7, 2023
the port information is stored in 'servus_port' (as a string)

Closes: HBPVIS#109
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant