Skip to content

Commit

Permalink
Merge branch 'master' of github.com:faceless2/zeroconf into gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike committed May 8, 2024
2 parents f004f22 + 4b3303a commit b37dc02
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
# Zeroconf

Zeroconf is a simple Java implementation of Multicast DNS Service Discovery, _aka_ the service discovery bit of Zeroconf.
Originally written as a quick hack to avoid having to use https://github.com/jmdns/jmdns, it has evolved into something
Originally written as a quick hack to avoid having to use [https://github.com/jmdns/jmdns](https://github.com/jmdns/jmdns), it has evolved into something
that can both announce and listen for Services on multiple interfaces (IPv4 and IPv6), including properly dealing with
changes to those interfaces.

Needs Java 11 or later, and there are no external dependencies.
* Requires Java 11+ and no other dependencies.
* Javadocs at [https://faceless2.github.io/zeroconf/docs](https://faceless2.github.io/zeroconf/docs/)
* Prebuilt binary at [https://faceless2.github.io/zeroconf/dist/zeroconf-1.0.jar](https://faceless2.github.io/zeroconf/dist/zeroconf-1.0.jar)

Here's a simple example for announcing:

```java
import com.bfo.zeroconf.*;

Zeroconf zc = new Zeroconf();
Service service = new Service.Builder()
.setName("MyWeb")
Expand All @@ -27,6 +31,8 @@ zc.close();
And to listen, either add a Listener for events, or use the live, thread-safe Collection of Services.

```java
import com.bfo.zeroconf.*;

Zeroconf zc = new Zeroconf();
zc.addListener(new ZeroconfListener() {
public void serviceNamed(String type, String name) {
Expand Down

0 comments on commit b37dc02

Please sign in to comment.