File tree Expand file tree Collapse file tree
src/main/java/org/mozilla/iot/webthing Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66
77 <groupId >org.mozilla.iot</groupId >
88 <artifactId >webthing</artifactId >
9- <version >0.12.2 </version >
9+ <version >0.12.3 </version >
1010
1111 <name >WebThing</name >
1212 <description >Implementation of an HTTP Web Thing.</description >
7373 <dependency >
7474 <groupId >org.json</groupId >
7575 <artifactId >json</artifactId >
76- <version >20190722 </version >
76+ <version >20200518 </version >
7777 </dependency >
7878 <dependency >
7979 <groupId >org.nanohttpd</groupId >
Original file line number Diff line number Diff line change 1212import java .net .InetAddress ;
1313import java .security .NoSuchAlgorithmException ;
1414import java .util .ArrayList ;
15+ import java .util .HashMap ;
1516import java .util .List ;
1617import java .util .Map ;
1718import java .util .Timer ;
@@ -293,11 +294,20 @@ public void start(boolean daemon) throws IOException {
293294 this .hosts .add (systemHostname );
294295 this .hosts .add (String .format ("%s:%d" , systemHostname , this .port ));
295296
297+ Map txt = new HashMap ();
298+ txt .put ("path" , "/" );
299+
300+ if (this .isTls ) {
301+ txt .put ("tls" , "1" );
302+ }
303+
296304 ServiceInfo serviceInfo = ServiceInfo .create ("_webthing._tcp.local" ,
297305 this .name ,
298306 null ,
299307 this .port ,
300- "path=/" );
308+ 0 ,
309+ 0 ,
310+ txt );
301311 this .jmdns .registerService (serviceInfo );
302312
303313 super .start (this .SOCKET_READ_TIMEOUT , daemon );
You can’t perform that action at this time.
0 commit comments