mjansson / mdns

Public domain mDNS/DNS-SD library in C
The Unlicense
437 stars 117 forks source link

Plans for a library. #67

Closed stefbon closed 1 year ago

stefbon commented 1 year ago

Hi,

first many thanks for writing! My software

https://github.com/stefbon/OSNS

relies on avahi for detection of services. I've been looking for something else, without the dependencies. mdns.c is one file, do you want to make a library? Otherwise I have to take out the functions myself I think are usefull, and that is not the way to do it. Better is a public library.

Stef the Netherlands

mjansson commented 1 year ago

I don't intend to make it into a library, no. The idea is that the header ´mdns.h´ is the "library" and the source file is just a reference to how it can be used.

stefbon commented 1 year ago

"the source file is just a reference to how it can be used"??

that's my point, the source file is not only using the functions, these functions are also in this source file. So the header file is worthless without the (only) source file. Again with the current situation I have to take out the functions of interest for my project, which is not ideal.

Stef

mjansson commented 1 year ago

What I mean is that the functionality provided by this "library" is completely contained in the header, including the implementation. It is only intended to provide a means to send and receive mDNS messages over network.

The mdns.c is just an example application showing how you can use the functionality of the header to implement your own application to utilize mDNS communication, it is not intended as part of the library - and never will be.

stefbon commented 1 year ago

O I see now. In the header file are the sources of relevant functions, which I did not expect. In headers normally are only prototypes, defines and declarations .

I will use the header in my project. Thanks again for writing this.

Stef