diff --git a/CHANGELOG.md b/CHANGELOG.md index 0fb4613..cc999aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ All notable changes to `@homebridge/ciao` will be documented in this file. This project tries to adhere to [Semantic Versioning](http://semver.org/). -## BETA +## v1.2.0 (2024-04-10) ### Changed diff --git a/docs/classes/CiaoService.html b/docs/classes/CiaoService.html index f4cdc04..a8b591f 100644 --- a/docs/classes/CiaoService.html +++ b/docs/classes/CiaoService.html @@ -1,4 +1,4 @@ -
A Responder instance represents a running MDNSServer and a set of advertised services.
+A Responder instance represents a running MDNSServer and a set of advertised services.
It will handle any service related operations, like advertising, sending goodbye packets or sending record updates. It handles answering questions arriving at the multicast address.
-Creates a new CiaoService instance and links it to this Responder instance.
Defines all information about the service which should be created.
The newly created CiaoService instance can be used to advertise and manage the created service.
-This method should be called when you want to unpublish all service exposed by this Responder. +
This method should be called when you want to unpublish all service exposed by this Responder. This method SHOULD be called before the node application exists, so any host on the network is informed of the shutdown of this machine. Calling the shutdown method is mandatory for a clean termination (sending goodbye packets).
The shutdown method must only be called ONCE.
The Promise resolves once all goodbye packets were sent (or immediately if any other users have a reference to this Responder instance).
-Const
Defines the transport protocol of a service.
+Const
Defines the transport protocol of a service.
As of RFC 6763 7. TCP must be used for any applications using tcp. For applications using any other transport protocol UDP must be used. This applies to all other transport protocols like SCTP, DCCP, RTMFP, etc
-Const
Events thrown by a CiaoService
-Const
Events thrown by a CiaoService
+Event is called when the Prober identifies that the hostname for the service is already used and thus resolve the name conflict by adjusting the hostname (e.g. adding '(2)' to the hostname). @@ -7,8 +7,8 @@ from the service name if not supplied. If you supply a custom hostname (not automatically derived from the service name) you must hook up a listener to this event in order for the hostname to be persisted.
-Event is called when the Prober identifies that the name for the service is already used +
Event is called when the Prober identifies that the name for the service is already used and thus resolve the name conflict by adjusting the name (e.g. adding '(2)' to the name). This change must be persisted and thus a listener must hook up to this event in order for the name to be persisted.
-Const
This enum defines some commonly used service types. +
Const
This enum defines some commonly used service types. This is also referred to as service name (as of RFC 6763). A service name must not be longer than 15 characters (RFC 6763 7.2).
-This method is used to get a responder for the provided (optional) set of options.
+This method is used to get a responder for the provided (optional) set of options.
Ciao tries to create as few Responder instances as possible. Thus, it will share the same Responder instance for the same set of options.
Optional
options: ResponderOptionsIf specified, the options will be passed to the underlying mdns server.
A Responder instance for the given options. Might be shared with others using the same options.
-+
mDNSResponder
on macOS or avahi
on most linux based systems).mdns
library is that running it on Windows is not really straight forward.
Generally we experienced with homebridge
that many users run into problems when trying to install mdns
.
Thus bonjour-hap
and then ciao
was created to provide a much easier to set up system.
-Defines the options passed to the underlying mdns server.
-Defines the options passed to the underlying mdns server.
+Optional
disableIf specified, the mdns server will not include any ipv6 address records and not bind any udp6 sockets. This is handy if you want to "bind" on 0.0.0.0 only.
-Optional
interfaceIf specified, the mdns server will only listen on the specified interfaces (allowlist). +
Optional
interfaceIf specified, the mdns server will only listen on the specified interfaces (allowlist). It can be supplied as a string (representing a single interface) or as an array of strings to define multiple interfaces. The interface can be defined by specifying the interface name (like 'en0') or by specifying an ip address.
-Service options supplied when creating a new ciao service.
-Service options supplied when creating a new ciao service.
+Optional
disabledThe service won't advertise ipv6 address records. This can be used to simulate binding on 0.0.0.0. May be combined with restrictedAddresses.
-Optional
domainAdds ability to set custom domain. Will default to "local". +
Optional
domainAdds ability to set custom domain. Will default to "local". The domain will also be automatically appended to the hostname.
-Optional
hostnameDefines a hostname under which the service can be reached. +
Optional
hostnameDefines a hostname under which the service can be reached. The specified hostname must not include the TLD. If undefined the service name will be used as default.
-Instance name of the service
-Optional
portPort of the service. +
Instance name of the service
+Optional
portPort of the service. If not supplied it must be set later via updatePort BEFORE advertising the service.
-Optional
protocolThe protocol the service uses. Default is TCP.
-Optional
restrictedIf defined it restricts the service to be advertised on the specified +
Optional
protocolThe protocol the service uses. Default is TCP.
+Optional
restrictedIf defined it restricts the service to be advertised on the specified ip addresses or interface names.
If an interface name is specified, ANY address on that given interface will be advertised (if an IP address of the given interface is also given in the array, it will be overridden). @@ -30,8 +30,8 @@ If an ip address is given, the ip address must be valid at the time of service creation.
If the service is set to advertise on a given interface, though the MDNSServer is configured to ignore this interface, the service won't be advertised on the interface.
-Optional
subtypesOptional array of subtypes of the service. +
Optional
subtypesOptional array of subtypes of the service. Refer to ServiceType for some known examples.
-Optional
txtIf defined, a txt record will be published with the given service.
-Type of the service.
-Optional
txtIf defined, a txt record will be published with the given service.
+Type of the service.
+A service txt consist of multiple key=value pairs, +
A service txt consist of multiple key=value pairs, which get advertised on the network.
-This method is used to get a responder for the provided (optional) set of options.
+This method is used to get a responder for the provided (optional) set of options.
Ciao tries to create as few Responder instances as possible. Thus, it will share the same Responder instance for the same set of options.
Optional
options: ResponderOptionsIf specified, the options will be passed to the underlying mdns server.
A Responder instance for the given options. Might be shared with others using the same options.
-
The CiaoService class represents a service which can be advertised on the network.
+- Preparing search index...
- The search index is not available
@homebridge/ciao - v1.2.0Class CiaoService
The CiaoService class represents a service which can be advertised on the network.
A service is identified by its fully qualified domain name (FQDN), which consist of the service name, the service type, the protocol and the service domain (.local by default).
The service defines a hostname and a port where the advertised service can be reached.
@@ -7,7 +7,7 @@A CiaoService class is always bound to a Responder and can be created using the Responder.createService method in the Responder class. Once the instance is created, advertise can be called to announce the service on the network.
-Hierarchy
Index
Methods
Hierarchy
Index
Methods
Returns Promise<void>
destroy
This method must be called if you want to free the memory used by this service. +
Returns Promise<void>
destroy
This method must be called if you want to free the memory used by this service. The service instance is not usable anymore after this call.
If the service is still announced, the service will first be removed from the network by calling end.
-Returns Promise<void>
end
This method will remove the advertisement for the service on all connected network interfaces. +
Returns Promise<void>
end
This method will remove the advertisement for the service on all connected network interfaces. If the service is still in the Probing state, probing will simply be cancelled.
Returns Promise<void>
Promise will resolve once the last goodbye packet was sent out
-getFQDN
Returns string
The fully qualified domain name of the service, used to identify the service.
-get Hostname
Returns string
The current hostname of the service.
-get Lower Cased SubtypePTRs
Returns undefined | string[]
Array of subtype pointers (undefined if no subtypes are specified).
-get Port
Returns number
The port the service is advertising for. +
getFQDN
Returns string
The fully qualified domain name of the service, used to identify the service.
+get Hostname
Returns string
The current hostname of the service.
+get Lower Cased SubtypePTRs
Returns undefined | string[]
Array of subtype pointers (undefined if no subtypes are specified).
+get Port
Returns number
The port the service is advertising for. {@code -1} is returned when the port is not yet set.
-get TypePTR
Returns string
The service type pointer.
-update Port
Sets or updates the port of the service. +
get TypePTR
Returns string
The service type pointer.
+update Port
Sets or updates the port of the service. A new port number can only be set when the service is still UNANNOUNCED. Otherwise, an assertion error will be thrown.
Parameters
The new port number.
-Returns void
update Txt
Sets or updates the txt of the service.
+Returns void
update Txt
Sets or updates the txt of the service.
Parameters
The updated txt record.
If set to true no announcement is sent for the updated record.
-Returns void
Settings
Member Visibility
Theme
On This Page
Returns void
Settings
Member Visibility
Theme
On This Page