public void RegNetP2pClient(object NetP2pUri) { try { NetPeerClient npcDummyClient = new NetPeerClient(); objClsNetP2PMainVideo = new ClsNetP2PMainVideo(); ((ClsNetP2PMainVideo)objClsNetP2PMainVideo).EntsvcJoin += new ClsNetP2PMainVideo.delsvcJoin(MainVideoDummies_NetP2P_EntsvcJoin); ((ClsNetP2PMainVideo)objClsNetP2PMainVideo).EntsvcGetUserList += new ClsNetP2PMainVideo.delsvcGetUserList(MainVideoDummies_NetP2P_EntsvcGetUserList); ((ClsNetP2PMainVideo)objClsNetP2PMainVideo).EntsvcSetUserList += new ClsNetP2PMainVideo.delsvcSetUserList(MainVideoDummies_NetP2P_EntsvcSetUserList); ((ClsNetP2PMainVideo)objClsNetP2PMainVideo).EntsvcUnJoin += new ClsNetP2PMainVideo.delsvcUnJoin(MainVideoDummies_NetP2P_EntsvcUnJoin); objINetP2PChannel = (INetP2PMainVideoChannel)npcDummyClient.OpenClient<INetP2PMainVideoChannel>(NetP2pUri.ToString(), NetP2pUri.ToString().Split(':')[2].Split('/')[2], ref objClsNetP2PMainVideo); while (tempcounter < 20) { try { objINetP2PChannel.svcJoin(UserName); tempcounter = 20; } catch { tempcounter++; System.Threading.Thread.Sleep(1000); } } } catch (Exception ex) { ex.Data.Add("My Key", "--RegNetP2pClient()---VMukti--:--VmuktiModules--:--Collaborative--:--Video.Presentation--:--MainVideoDummies.cs--:"); //ClsException.LogError(ex); //ClsException.WriteToErrorLogFile(ex); System.Text.StringBuilder sb = new StringBuilder(); sb.AppendLine(ex.Message); sb.AppendLine(); sb.AppendLine("StackTrace : " + ex.StackTrace); sb.AppendLine(); sb.AppendLine("Location : " + ex.Data["My Key"].ToString()); sb.AppendLine(); sb1 = CreateTressInfo(); sb.Append(sb1.ToString()); VMuktiAPI.ClsLogging.WriteToTresslog(sb); } }
void RegVideop2pClient(string P2PUri) { try { NetPeerClient npcDummyVideo = new NetPeerClient(); objNetTcpVideo = new ClsNetP2PMainVideo(); ((ClsNetP2PMainVideo)objNetTcpVideo).EntsvcJoin +=new ClsNetP2PMainVideo.delsvcJoin(P2PVideoClient_EntsvcJoin); ((ClsNetP2PMainVideo)objNetTcpVideo).EntsvcGetUserList += new ClsNetP2PMainVideo.delsvcGetUserList(P2PVideoClient_EntsvcGetUserList); ((ClsNetP2PMainVideo)objNetTcpVideo).EntsvcSetUserList += new ClsNetP2PMainVideo.delsvcSetUserList(P2PVideoClient_EntsvcSetUserList); ((ClsNetP2PMainVideo)objNetTcpVideo).EntsvcUnJoin += new ClsNetP2PMainVideo.delsvcUnJoin(P2PVideoClient_EntsvcUnJoin); channelNettcpVideo = (INetP2PMainVideoChannel)npcDummyVideo.OpenClient<INetP2PMainVideoChannel>(P2PUri, P2PUri.ToString().Split(':')[2].Split('/')[2], ref objNetTcpVideo); while (tempcounter < 20) { try { channelNettcpVideo.svcJoin(UserName); tempcounter = 20; } catch { tempcounter++; System.Threading.Thread.Sleep(1000); } } } catch (Exception exp) { exp.Data.Add("My Key", "RegVideop2pClient()--:--P2PVideoClient.cs--:--" + exp.Message + " :--:--"); //ClsException.LogError(exp); //ClsException.WriteToErrorLogFile(exp); System.Text.StringBuilder sb = new StringBuilder(); sb.AppendLine(exp.Message); sb.AppendLine(); sb.AppendLine("StackTrace : " + exp.StackTrace); sb.AppendLine(); sb.AppendLine("Location : " + exp.Data["My Key"].ToString()); sb.AppendLine(); sb1 = CreateTressInfo(); sb.Append(sb1.ToString()); VMuktiAPI.ClsLogging.WriteToTresslog(sb); } }