GithubHelp home page GithubHelp logo

amolenaar / nerves_dnssd Goto Github PK

View Code? Open in Web Editor NEW
7.0 2.0 3.0 347 KB

mDNS/DNS-SD implementation for Nerves, based on Apple's Bonjour daemon

License: Apache License 2.0

Makefile 3.35% C 22.03% Elixir 17.15% Erlang 57.47%
elixir nerves embedded bonjour zeroconf

nerves_dnssd's Introduction

Nerves.Dnssd

Build Status Hex.pm package Hex.pm package

Nerves_dnssd provides an interface to Apple's Bonjour DNS Service Discovery implementation. Bonjour allows applications to browse, resolve and register network services via link-local multicast DNS on the local network and via unicast DNS over the internet.

This module is based on the Dnssd_erlang project written by Andrew Tunnell-Jones, Radosław Szymczyszyn and others.

Installation

Nerves_dnssd requires Erlang R19 or later and Elixir 1.5.0 or later.

The package can be installed by adding Nerves_dnssd to your list of dependencies in mix.exs:

def deps do
  [{:nerves_dnssd, "~> x.y"}]
end

Further documentation can be found on the (HexDocs page for Nerves_dnssd)[https://hexdocs.pm/nerves_dnssd/].

Example use

In the most basic situation, where one wants to simply register a service on the network, calling

{:ok, pid} = Nerves.Dnssd.register("Fancy service name", "_http._tcp", 8080)

is sufficient to register a HTTP service listening on port 8080. In case there is already a service named "Fancy service name" a new name will be determined by using a follow-up number and that name will be registered, so that after a restart the service will advertise itself with the same name.

License

This project is distributed under the Apache License, version 2.0. The conditions can be found in the LICENSE file.

nerves_dnssd's People

Contributors

amolenaar avatar andrewtj avatar benoitc avatar erszcz avatar mobileoverlord avatar umatomba avatar yrashk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

nerves_dnssd's Issues

Persist service name once a service is registered

Part of the DNS-SD spec states that a service name should not change. Hence, in the case of a name class on the local network, the service should initially try to register the same name after a reboot.

E.g. if the service tries to register name "Webserver", but that name is already taken, it will register as "Webserver (2)". Next time it boots it should also register itself as "Webserver (2)", not "Webserver" although that name may be available again.

Preferably this should be saved in the SystemRegistry.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.