aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeService.cs
diff options
context:
space:
mode:
authorRoy <Roy.mail.net@gmail.com>2022-12-20 13:06:58 +0200
committerRoy <Roy.mail.net@gmail.com>2022-12-20 13:06:58 +0200
commit2daf438fd6902138b4229e21a8d67b02da778599 (patch)
treed91655cbf00b48d48a375bec1e48367809808fd9 /Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeService.cs
parent144f4d40b74b552277c12edc6d41b8676440070a (diff)
downloadTango-2daf438fd6902138b4229e21a8d67b02da778599.tar.gz
Tango-2daf438fd6902138b4229e21a8d67b02da778599.zip
Modified TCP machines discovery method to MultiCast.
Diffstat (limited to 'Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeService.cs')
-rw-r--r--Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeService.cs5
1 files changed, 4 insertions, 1 deletions
diff --git a/Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeService.cs b/Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeService.cs
index 4218f9e9a..6396774ae 100644
--- a/Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeService.cs
+++ b/Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeService.cs
@@ -40,6 +40,7 @@ namespace Tango.Integration.ExternalBridge
private TcpServer _tcpServer;
private int _discovery_port = 8888; //Will be overridden by settings in constructor..
private int _external_bridge_port = 1984; //Will be overridden by settings in constructor..
+ private String _multicastAddress = "234.55.66.77"; //Will be overridden by settings in constructor..
private HubConnection _connection;
private IHubProxy _proxy;
private bool _isSignalRConnected;
@@ -199,6 +200,7 @@ namespace Tango.Integration.ExternalBridge
_discovery_port = settings.ExternalBridgeServiceDiscoveryPort;
_external_bridge_port = settings.ExternalBridgeServicePort;
+ _multicastAddress = settings.ExternalBridgeMulticastGroup;
_tcpServer = new TcpServer(_external_bridge_port);
_tcpServer.ClientConnected += _tcpServer_ClientConnected;
@@ -234,7 +236,8 @@ namespace Tango.Integration.ExternalBridge
_discoveryService = new UdpDiscoveryService<ExternalBridgeUdpDiscoveryPacket>(_discovery_port, new ExternalBridgeUdpDiscoveryPacket()
{
SerialNumber = Machine.SerialNumber,
- });
+ Guid = Machine.Guid,
+ }) { MulticastGroupAddress = _multicastAddress };
_discoveryService.BeforeBroadcasting -= _discoverySevice_BeforeBroadcasting;
_discoveryService.BeforeBroadcasting += _discoverySevice_BeforeBroadcasting;