public override void initConnectionListener(ConnectionListenerPrx listener, Current current__) { print("receive client callback listener"); if (clientProxyList.ContainsKey(currentRtspId)) { clientProxyList[currentRtspId].proxy = listener; } }
private void btndynamicDetect_Click(object sender, RoutedEventArgs e) { var sb = new StringBuilder(); sb.Append("threshold".ElementText("0.5")); sb.Append("rtspId".ElementText("1")); sb.Append("rtspPath".ElementText("rtsp://*****:*****@192.0.0.64:554/h264/ch1/main/av_stream")); sb.Append("responseType".ElementBegin()); if (ckbCallback.IsChecked.Value) { sb.Append("type".ElementText("callback")); } else { sb.Append("type".ElementText("messageQueue")); } sb.Append("size".ElementText("10")); sb.Append("responseType".ElementEnd()); sb.Append("maxImageCount".ElementText("3")); sb.Append("frames".ElementText("5")); var data = sb.ToString(); var xml = GetXml("dynamicDetect", data); var content = facePxy.send(xml); XmlDocument doc = new XmlDocument(); doc.LoadXml(content); var code = doc.GetNodeText("code"); Item("code->" + code); if (ckbCallback.IsChecked.Value) { callbackAdapter = ic.createObjectAdapterWithEndpoints("callback-receiver", "default"); Ice.Object callbackServant = new ConnectorDisp(Item); callbackAdapter.add(callbackServant, ic.stringToIdentity("callbackReceiver")); callbackAdapter.activate(); ConnectionListenerPrx listenerPxy = null; var objectPxy = callbackAdapter.createProxy(ic.stringToIdentity("callbackReceiver")); listenerPxy = ConnectionListenerPrxHelper.checkedCast(objectPxy); facePxy.initConnectionListener(listenerPxy); Item("set callback ok"); } }
public override void initConnectionListener(ConnectionListenerPrx listener, Current current__) { clientPxy = listener; _stopCallback = false; print("receive client callback listener"); Task.Factory.StartNew(() => { while (!_stopCallback) { listener.onRecv("终于等到你->" + DateTime.Now); Thread.Sleep(1000); } }); }
public static ConnectionListenerPrx uncheckedCast(Ice.ObjectPrx b) { if (b == null) { return(null); } ConnectionListenerPrx r = b as ConnectionListenerPrx; if (r == null) { ConnectionListenerPrxHelper h = new ConnectionListenerPrxHelper(); h.copyFrom__(b); r = h; } return(r); }
public static ConnectionListenerPrx checkedCast(Ice.ObjectPrx b, _System.Collections.Generic.Dictionary <string, string> ctx) { if (b == null) { return(null); } ConnectionListenerPrx r = b as ConnectionListenerPrx; if ((r == null) && b.ice_isA(ice_staticId(), ctx)) { ConnectionListenerPrxHelper h = new ConnectionListenerPrxHelper(); h.copyFrom__(b); r = h; } return(r); }
private void Setcallback() { callbackAdapter = FaceServices.FaceProxy.Ic.createObjectAdapterWithEndpoints("callback-receiver", "default"); Ice.Object callbackServant = new ConnectorDisp(FaceBack); callbackAdapter.add(callbackServant, FaceServices.FaceProxy.Ic.stringToIdentity("callbackReceiver")); callbackAdapter.activate(); ConnectionListenerPrx listenerPxy = null; var objectPxy = callbackAdapter.createProxy(FaceServices.FaceProxy.Ic.stringToIdentity("callbackReceiver")); listenerPxy = ConnectionListenerPrxHelper.checkedCast(objectPxy); FaceServices.FaceProxy.initConnectionListener(listenerPxy); Item("set callback ok"); }
public void initConnectionListener(ConnectionListenerPrx listener) { facePxy.initConnectionListener(listener); }
public static void write__(IceInternal.BasicStream os__, ConnectionListenerPrx v__) { os__.writeProxy(v__); }