private void OnBeaconRecieved(IPEndPoint remoteEndPoint, AntelopeBeacon beacon) { if (m_KnownBeacons.ContainsKey(beacon.Uuid)) { return; } m_KnownBeacons.Add(beacon.Uuid, beacon); m_Callback.OnNewServerDiscovered(remoteEndPoint, beacon); }
private void NewServerDiscovered(AntelopeBeacon beacon) { if (beacon.Properties.ProductId != "0xa150") { return; } m_Beacons.Add(beacon.Uuid, beacon); m_Menu.AddDevice(string.Format("Goliath {0}", beacon.Properties.SerialNumber), beacon.Uuid); if (!m_Client.IsConnected) { m_Icon.ShowBaloon("New device found", string.Format("Connecting to {0}:{1}", beacon.Ip, beacon.Port), ToolTipIcon.None); m_Client.Connect(beacon.Ip, beacon.Port, beacon.Uuid); } }
void IAntelopeBeaconListenerCallback.OnNewServerDiscovered(System.Net.IPEndPoint remoteEndPoint, AntelopeBeacon beacon) { m_UiIvoke.Invoke(() => NewServerDiscovered(beacon)); }
void IAntelopeBeaconListenerCallback.OnNewServerDiscovered(IPEndPoint remoteEndPoint, AntelopeBeacon beacon) { Console.WriteLine("New server discovered: {0} {1}", remoteEndPoint, beacon); }