1
0
Fork 0
mirror of https://gitlab.com/futo-org/fcast.git synced 2025-08-11 18:12:49 +00:00

Removal of encryption.,

This commit is contained in:
Koen 2023-12-30 11:28:36 +01:00
parent 9599c1931e
commit a991b353a6
16 changed files with 24 additions and 980 deletions

View file

@ -4,9 +4,7 @@ const os = require('os');
export class DiscoveryService {
private serviceTcp: any;
private serviceTls: any;
private serviceWs: any;
private serviceWss: any;
private static getComputerName() {
switch (process.platform) {
@ -23,7 +21,7 @@ export class DiscoveryService {
}
start() {
if (this.serviceTcp || this.serviceTls || this.serviceWs || this.serviceWss) {
if (this.serviceTcp || this.serviceWs) {
return;
}
@ -32,12 +30,8 @@ export class DiscoveryService {
this.serviceTcp = mdns.createAdvertisement(mdns.tcp('_fcast'), 46899, { name: name });
this.serviceTcp.start();
this.serviceTls = mdns.createAdvertisement(mdns.tcp('_fcast-tls'), 46897, { name: name });
this.serviceTls.start();
this.serviceWs = mdns.createAdvertisement(mdns.tcp('_fcast-ws'), 46898, { name: name });
this.serviceWs.start();
this.serviceWss = mdns.createAdvertisement(mdns.tcp('_fcast-wss'), 46896, { name: name });
this.serviceWss.start();
}
stop() {
@ -46,19 +40,9 @@ export class DiscoveryService {
this.serviceTcp = null;
}
if (this.serviceTls) {
this.serviceTls.stop();
this.serviceTls = null;
}
if (this.serviceWs) {
this.serviceWs.stop();
this.serviceWs = null;
}
if (this.serviceWss) {
this.serviceWss.stop();
this.serviceWss = null;
}
}
}