void RegAudiop2pClient(string P2PUri) { try { NetPeerClient npcDummyAudio = new NetPeerClient(); objNetTcpAudio = new clsNetTcpAudio(); ((clsNetTcpAudio)objNetTcpAudio).EntsvcP2PJoin += new clsNetTcpAudio.DelsvcP2PJoin(P2PAudioClient_EntsvcP2PJoin); ((clsNetTcpAudio)objNetTcpAudio).EntsvcP2PUnJoin += new clsNetTcpAudio.DelsvcP2PUnJoin(P2PAudioClient_EntsvcP2PUnJoin); channelNettcpAudio = (INetTcpAudioChannel)npcDummyAudio.OpenClient <INetTcpAudioChannel>(P2PUri, P2PUri.ToString().Split(':')[2].Split('/')[2], ref objNetTcpAudio); while (tempcounter < 20) { try { channelNettcpAudio.svcP2PJoin(UserName); tempcounter = 20; } catch { tempcounter++; System.Threading.Thread.Sleep(1000); } } } catch (Exception ex) { VMuktiHelper.ExceptionHandler(ex, "RegAudiop2pClient()", "Audio\\P2PAudioClient.cs"); } }
void RegAudiop2pClient(string P2PUri) { try { NetPeerClient npcDummyAudio = new NetPeerClient(); objNetTcpAudio = new clsNetTcpAudio(); ((clsNetTcpAudio)objNetTcpAudio).EntsvcP2PJoin += new clsNetTcpAudio.DelsvcP2PJoin(P2PAudioClient_EntsvcP2PJoin); ((clsNetTcpAudio)objNetTcpAudio).EntsvcP2PUnJoin += new clsNetTcpAudio.DelsvcP2PUnJoin(P2PAudioClient_EntsvcP2PUnJoin); channelNettcpAudio = (INetTcpAudioChannel)npcDummyAudio.OpenClient<INetTcpAudioChannel>(P2PUri, P2PUri.ToString().Split(':')[2].Split('/')[2], ref objNetTcpAudio); while (tempcounter < 20) { try { channelNettcpAudio.svcP2PJoin(UserName); tempcounter = 20; } catch { tempcounter++; System.Threading.Thread.Sleep(1000); } } } catch (Exception ex) { VMuktiHelper.ExceptionHandler(ex, "RegAudiop2pClient()", "Audio\\P2PAudioClient.cs"); } }
void RegNetP2PClient(object netP2pUri) { try { VMuktiService.NetPeerClient npcDummyChat = new VMuktiService.NetPeerClient(); objNetTcpAudio = new clsNetTcpAudio(); ((clsNetTcpAudio)objNetTcpAudio).EntsvcP2PJoin += new clsNetTcpAudio.DelsvcP2PJoin(AudioDummy_EntsvcP2PJoin); ((clsNetTcpAudio)objNetTcpAudio).EntsvcP2PStartConference += new clsNetTcpAudio.DelsvcP2PStartConference(AudioDummy_EntsvcP2PStartConference); ((clsNetTcpAudio)objNetTcpAudio).EntsvcGetUserList += new clsNetTcpAudio.DelsvcGetUserList(AudioDummy_EntsvcP2PGetUserList); ((clsNetTcpAudio)objNetTcpAudio).EntsvcSetUserList += new clsNetTcpAudio.DelsvcSetUserList(AudioDummy_EntsvcP2PSetUserList); ((clsNetTcpAudio)objNetTcpAudio).EntsvcP2PUnJoin += new clsNetTcpAudio.DelsvcP2PUnJoin(AudioDummy_EntsvcP2PUnJoin); NetTcpAudioChannel = (INetTcpAudioChannel)npcDummyChat.OpenClient <INetTcpAudioChannel>(netP2pUri.ToString(), netP2pUri.ToString().Split(':')[2].Split('/')[2], ref objNetTcpAudio); while (tempcounter < 20) { try { NetTcpAudioChannel.svcP2PJoin(UserName); tempcounter = 20; } catch { tempcounter++; System.Threading.Thread.Sleep(1000); } } } catch (Exception ex) { VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "RegNetP2PClient()", "AudioDummy.cs"); } }
void RegNetP2PClient(object netP2pUri) { try { VMuktiService.NetPeerClient npcDummyChat = new VMuktiService.NetPeerClient(); objNetTcpAudio = new clsNetTcpAudio(); ((clsNetTcpAudio)objNetTcpAudio).EntsvcP2PJoin += new clsNetTcpAudio.DelsvcP2PJoin(AudioDummy_EntsvcP2PJoin); ((clsNetTcpAudio)objNetTcpAudio).EntsvcP2PStartConference += new clsNetTcpAudio.DelsvcP2PStartConference(AudioDummy_EntsvcP2PStartConference); ((clsNetTcpAudio)objNetTcpAudio).EntsvcP2PUnJoin += new clsNetTcpAudio.DelsvcP2PUnJoin(AudioDummy_EntsvcP2PUnJoin); NetTcpAudioChannel = (INetTcpAudioChannel)npcDummyChat.OpenClient <INetTcpAudioChannel>(netP2pUri.ToString(), netP2pUri.ToString().Split(':')[2].Split('/')[2], ref objNetTcpAudio); while (tempcounter < 20) { try { NetTcpAudioChannel.svcP2PJoin(UserName); tempcounter = 20; } catch { tempcounter++; System.Threading.Thread.Sleep(1000); } } } catch (Exception ex) { ex.Data.Add("My Key", "VMukti--:--VmuktiModules--:--Call Center--:--AutoProgressiveSoftPhone--:--AutoProgressivePhone.Presentation--:--AudioDummy.cs--:--RegNetP2PClient()--"); ClsException.LogError(ex); ClsException.WriteToErrorLogFile(ex); throw ex; } }
void AudioDummy_EntsvcJoin(string uName) { try { lstNodes.Add(uName); NetTcpAudioChannel.svcP2PJoin(uName); } catch (Exception ex) { VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "AudioDummy_EntsvcJoin()", "AudioDummy.cs"); } }
void FncOpenClinet(object lstParameters) { try { System.Collections.Generic.List<object> lstTempObj = (System.Collections.Generic.List<object>)lstParameters; strUri = lstTempObj[1].ToString(); if ((VMuktiAPI.PeerType)lstTempObj[0] == VMuktiAPI.PeerType.NodeWithNetP2P || (VMuktiAPI.PeerType)lstTempObj[0] == VMuktiAPI.PeerType.BootStrap || (VMuktiAPI.PeerType)lstTempObj[0] == VMuktiAPI.PeerType.SuperNode) { VMuktiService.NetPeerClient ncpAudio = new VMuktiService.NetPeerClient(); ((clsNetTcpAudio)objNetTcpAudio).EntsvcP2PJoin += new Audio.Business.Service.NetP2P.clsNetTcpAudio.DelsvcP2PJoin(ctlDialer_EntsvcP2PJoin); ((clsNetTcpAudio)objNetTcpAudio).EntsvcP2PStartConference += new Audio.Business.Service.NetP2P.clsNetTcpAudio.DelsvcP2PStartConference(ctlDialer_EntsvcP2PStartConference); ((clsNetTcpAudio)objNetTcpAudio).EntsvcGetUserList += new clsNetTcpAudio.DelsvcGetUserList(ctlDialer_EntsvcGetUserList); ((clsNetTcpAudio)objNetTcpAudio).EntsvcSetUserList += new clsNetTcpAudio.DelsvcSetUserList(ctlDialer_EntsvcSetUserList); ((clsNetTcpAudio)objNetTcpAudio).EntsvcP2PUnJoin += new Audio.Business.Service.NetP2P.clsNetTcpAudio.DelsvcP2PUnJoin(ctlDialer_EntsvcP2PUnJoin); NetP2PChannel = (INetTcpAudioChannel)ncpAudio.OpenClient<INetTcpAudioChannel>(strUri, strUri.ToString().Split(':')[2].Split('/')[2], ref objNetTcpAudio); while (temp < 20) { try { ClsException.WriteToLogFile("Going to call svcJoin"); NetP2PChannel.svcP2PJoin(VMuktiAPI.VMuktiInfo.CurrentPeer.DisplayName); ClsException.WriteToLogFile("svcJoin has been called."); temp = 20; this.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Normal, objDelStartIntitialConfrence); if (strMyRole == "Host") { NetP2PChannel.svcGetUserList(VMuktiAPI.VMuktiInfo.CurrentPeer.DisplayName, strDefaultConfNumber); } else { NetP2PChannel.svcGetUserList(VMuktiAPI.VMuktiInfo.CurrentPeer.DisplayName, ""); } } catch { temp++; System.Threading.Thread.Sleep(1000); } } } else { VMuktiService.BasicHttpClient bhcAudio = new VMuktiService.BasicHttpClient(); Httpchannel = (IHttpAudio)bhcAudio.OpenClient<IHttpAudio>(strUri); while (tempcounter < 20) { try { Httpchannel.svcJoin(VMuktiAPI.VMuktiInfo.CurrentPeer.DisplayName); tempcounter = 20; this.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Normal, objDelStartIntitialConfrence); if (strMyRole == "Host") { Httpchannel.svcGetUserList(VMuktiAPI.VMuktiInfo.CurrentPeer.DisplayName, strDefaultConfNumber); } else { Httpchannel.svcGetUserList(VMuktiAPI.VMuktiInfo.CurrentPeer.DisplayName, ""); } } catch { tempcounter++; System.Threading.Thread.Sleep(1000); } } dtGetConference.Interval = TimeSpan.FromSeconds(2); dtGetConference.Tick += new EventHandler(dtGetConference_Tick); dtGetConference.Start(); } ClsException.WriteToLogFile("Opening client Completed successfully"); } catch (Exception ex) { VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "FncOpenClient()", "Audio\\ctlDialer.xaml.cs"); } }
private void FncOpenClinet(object lstParameters) { try { System.Collections.Generic.List<object> lstTempObj = (System.Collections.Generic.List<object>)lstParameters; strUri = lstTempObj[1].ToString(); if ((VMuktiAPI.PeerType)lstTempObj[0] == VMuktiAPI.PeerType.NodeWithNetP2P || (VMuktiAPI.PeerType)lstTempObj[0] == VMuktiAPI.PeerType.BootStrap || (VMuktiAPI.PeerType)lstTempObj[0] == VMuktiAPI.PeerType.SuperNode) { VMuktiService.NetPeerClient ncpAudio = new VMuktiService.NetPeerClient(); ((clsNetTcpAudio)objNetTcpAudio).EntsvcP2PJoin += new AutoProgressivePhone.Business.Service.NetP2P.clsNetTcpAudio.DelsvcP2PJoin(ctlDialer_EntsvcP2PJoin); ((clsNetTcpAudio)objNetTcpAudio).EntsvcP2PStartConference += new AutoProgressivePhone.Business.Service.NetP2P.clsNetTcpAudio.DelsvcP2PStartConference(ctlDialer_EntsvcP2PStartConference); ((clsNetTcpAudio)objNetTcpAudio).EntsvcP2PUnJoin += new AutoProgressivePhone.Business.Service.NetP2P.clsNetTcpAudio.DelsvcP2PUnJoin(ctlDialer_EntsvcP2PUnJoin); NetP2PChannel = (INetTcpAudioChannel)ncpAudio.OpenClient<INetTcpAudioChannel>(strUri, strUri.ToString().Split(':')[2].Split('/')[2], ref objNetTcpAudio); while (temp < 20) { try { NetP2PChannel.svcP2PJoin(VMuktiAPI.VMuktiInfo.CurrentPeer.DisplayName); temp = 20; } catch { temp++; System.Threading.Thread.Sleep(1000); } } } else { VMuktiService.BasicHttpClient bhcAudio = new VMuktiService.BasicHttpClient(); Httpchannel = (IHttpAudio)bhcAudio.OpenClient<IHttpAudio>(strUri); while (tempcounter < 20) { try { Httpchannel.svcJoin(VMuktiAPI.VMuktiInfo.CurrentPeer.DisplayName); tempcounter = 20; } catch { tempcounter++; System.Threading.Thread.Sleep(1000); } } dtGetConference.Interval = TimeSpan.FromSeconds(2); dtGetConference.Tick += new EventHandler(dtGetConference_Tick); dtGetConference.Start(); } } catch (Exception ex) { VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "fncOpenClient()", "ctlDialer.xaml.cs"); } }
void RegNetP2PClient(object netP2pUri) { try { VMuktiService.NetPeerClient npcDummyChat = new VMuktiService.NetPeerClient(); objNetTcpAudio = new clsNetTcpAudio(); ((clsNetTcpAudio)objNetTcpAudio).EntsvcP2PJoin += new clsNetTcpAudio.DelsvcP2PJoin(AudioDummy_EntsvcP2PJoin); ((clsNetTcpAudio)objNetTcpAudio).EntsvcP2PStartConference += new clsNetTcpAudio.DelsvcP2PStartConference(AudioDummy_EntsvcP2PStartConference); ((clsNetTcpAudio)objNetTcpAudio).EntsvcGetUserList += new clsNetTcpAudio.DelsvcGetUserList(AudioDummy_EntsvcP2PGetUserList); ((clsNetTcpAudio)objNetTcpAudio).EntsvcSetUserList += new clsNetTcpAudio.DelsvcSetUserList(AudioDummy_EntsvcP2PSetUserList); ((clsNetTcpAudio)objNetTcpAudio).EntsvcP2PUnJoin += new clsNetTcpAudio.DelsvcP2PUnJoin(AudioDummy_EntsvcP2PUnJoin); NetTcpAudioChannel = (INetTcpAudioChannel)npcDummyChat.OpenClient<INetTcpAudioChannel>(netP2pUri.ToString(), netP2pUri.ToString().Split(':')[2].Split('/')[2], ref objNetTcpAudio); while (tempcounter < 20) { try { NetTcpAudioChannel.svcP2PJoin(UserName); tempcounter = 20; } catch { tempcounter++; System.Threading.Thread.Sleep(1000); } } } catch (Exception ex) { VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "RegNetP2PClient()", "AudioDummy.cs"); } }
void RegNetP2PClient(object netP2pUri) { try { VMuktiService.NetPeerClient npcDummyChat = new VMuktiService.NetPeerClient(); objNetTcpAudio = new clsNetTcpAudio(); ((clsNetTcpAudio)objNetTcpAudio).EntsvcP2PJoin += new clsNetTcpAudio.DelsvcP2PJoin(AudioDummy_EntsvcP2PJoin); ((clsNetTcpAudio)objNetTcpAudio).EntsvcP2PStartConference += new clsNetTcpAudio.DelsvcP2PStartConference(AudioDummy_EntsvcP2PStartConference); ((clsNetTcpAudio)objNetTcpAudio).EntsvcP2PUnJoin += new clsNetTcpAudio.DelsvcP2PUnJoin(AudioDummy_EntsvcP2PUnJoin); NetTcpAudioChannel = (INetTcpAudioChannel)npcDummyChat.OpenClient<INetTcpAudioChannel>(netP2pUri.ToString(), netP2pUri.ToString().Split(':')[2].Split('/')[2], ref objNetTcpAudio); while (tempcounter < 20) { try { NetTcpAudioChannel.svcP2PJoin(UserName); tempcounter = 20; } catch { tempcounter++; System.Threading.Thread.Sleep(1000); } } } catch (Exception ex) { ex.Data.Add("My Key", "VMukti--:--VmuktiModules--:--Call Center--:--AutoProgressiveSoftPhone--:--AutoProgressivePhone.Presentation--:--AudioDummy.cs--:--RegNetP2PClient()--"); ClsException.LogError(ex); ClsException.WriteToErrorLogFile(ex); throw ex; } }