Package edu.wpi.first.net
Class MulticastServiceAnnouncer
java.lang.Object
edu.wpi.first.net.MulticastServiceAnnouncer
- All Implemented Interfaces:
AutoCloseable
public class MulticastServiceAnnouncer extends Object implements AutoCloseable
Class to announce over mDNS that a service is available.
-
Constructor Summary
Constructors Constructor Description MulticastServiceAnnouncer(String serviceName, String serviceType, int port)
Creates a MulticastServiceAnnouncer.MulticastServiceAnnouncer(String serviceName, String serviceType, int port, Map<String,String> txt)
Creates a MulticastServiceAnnouncer. -
Method Summary
Modifier and Type Method Description void
close()
boolean
hasImplementation()
Returns true if there's a multicast service announcer implementation.void
start()
Starts multicast service announcer.void
stop()
Stops multicast service announcer.
-
Constructor Details
-
MulticastServiceAnnouncer
public MulticastServiceAnnouncer(String serviceName, String serviceType, int port, Map<String,String> txt)Creates a MulticastServiceAnnouncer.- Parameters:
serviceName
- service nameserviceType
- service typeport
- porttxt
- txt
-
MulticastServiceAnnouncer
Creates a MulticastServiceAnnouncer.- Parameters:
serviceName
- service nameserviceType
- service typeport
- port
-
-
Method Details
-
close
- Specified by:
close
in interfaceAutoCloseable
-
start
Starts multicast service announcer. -
stop
Stops multicast service announcer. -
hasImplementation
Returns true if there's a multicast service announcer implementation.- Returns:
- True if there's a multicast service announcer implementation.
-