private void StartHost() { var t = new Thread(() => { _host = new GenericHost(7891); _host.HostLaunched += new HostLaunchedHandler(host_HostLaunched); _host.Open(new ActivityManager(new User(), "c:/files/"), typeof(IActivityManager), "desk"); }); t.Start(); }
private int StartCallbackService() { if (_callbackService != null) return _callbackService.Port; lock (_callbackInitialisationLock) { try { _callbackService = new GenericHost(7890); _callbackService.Open(this, typeof (INetEventHandler), "CallbackService"); Log.Out("ActivityClient", string.Format("Callback service initialized at {0}", _callbackService.Address), LogCode.Log); } catch (Exception ex) { _callbackService = new GenericHost(); _callbackService.Open(this, typeof(INetEventHandler), "CallbackService"); Log.Out("ActivityClient", string.Format("Callback service initialized at {0}", _callbackService.Address), LogCode.Log); } return _callbackService.Port; } }
/// <summary> /// Starts an activity manager service in an bacic http service host /// </summary> public void StartActivityManager() { Task.Factory.StartNew( delegate { _host = new GenericHost(7891); _host.HostLaunched += HostHostLaunched; _host.Open(new ActivityManager(_owner, "c:/files/"), typeof (IActivityManager), _device.Name); _host.StartBroadcast(Settings.Default.DISCOVERY_TYPE, _device.Name, _device.TagValue.ToString(), _device.Location); }); }
private void StartActivityManager() { Task.Factory.StartNew( delegate { _host = new GenericHost(); _host.HostLaunched += HostHostLaunched; _host.Open(new ActivityManager(_user, "c:/files/"), typeof(IActivityManager), "Tablet manager"); _host.StartBroadcast(DiscoveryType.WSDiscovery, "Tablet", "205"); }); }