コード例 #1
0
        public void RegHttpServer(object httpUri)
        {
            try
            {
                objClsHttpMainVideo = new ClsHttpMainVideo();
                ((ClsHttpMainVideo)objClsHttpMainVideo).EntsvcJoin        += new ClsHttpMainVideo.delsvcJoin(MainVideoDummies_http_EntsvcJoin);
                ((ClsHttpMainVideo)objClsHttpMainVideo).EntsvcGetUserList += new ClsHttpMainVideo.delsvcGetUserList(MainVideoDummies_http_EntsvcGetUserList);
                ((ClsHttpMainVideo)objClsHttpMainVideo).EntsvcSetUserList += new ClsHttpMainVideo.delsvcSetUserList(MainVideoDummies_http_EntsvcSetUserList);
                ((ClsHttpMainVideo)objClsHttpMainVideo).EntsvcGetMessage  += new ClsHttpMainVideo.delsvcGetMessage(MainVideoDummies_http_EntsvcGetMessage);
                ((ClsHttpMainVideo)objClsHttpMainVideo).EntsvcUnJoin      += new ClsHttpMainVideo.delsvcUnJoin(MainVideoDummies_http_EntsvcUnJoin);

                HttpMainVideoServer = new BasicHttpServer(ref objClsHttpMainVideo, httpUri.ToString());
                HttpMainVideoServer.AddEndPoint <IHttpMainVideo>(httpUri.ToString());
                HttpMainVideoServer.OpenServer();
            }
            catch (Exception ex)
            {
                ex.Data.Add("My Key", "--RegHttpServer()---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);
            }
        }
コード例 #2
0
ファイル: ClsYateSuperNode.cs プロジェクト: xiaoliukai/VMukti
        public ClsYateSuperNode()
        {
            objHttpService = new clsService();
            ((clsService)objHttpService).EntsvcAddSIPUser          += new clsService.DelsvcAddSIPUser(ClsYateSuperNode_EntsvcAddSIPUser);
            ((clsService)objHttpService).EntsvcGetConferenceNumber += new clsService.DelsvcGetConferenceNumber(ClsYateSuperNode_EntsvcGetConferenceNumber);
            ((clsService)objHttpService).EntsvcRemoveSIPUser       += new clsService.DelsvcsvcRemoveSIPUser(ClsYateSuperNode_EntsvcRemoveSIPUser);

            BasicHttpServer bhsHttpBootStrap = new BasicHttpServer(ref objHttpService, "http://" + VMuktiInfo.CurrentPeer.SuperNodeIP + ":80/SNService");

            bhsHttpBootStrap.AddEndPoint <IService>("http://" + VMuktiInfo.CurrentPeer.SuperNodeIP + ":80/SNService");
            bhsHttpBootStrap.OpenServer();
        }
コード例 #3
0
        public ClsYateSuperNode()
        {
            objHttpService = new clsService();
            ((clsService)objHttpService).EntsvcAddSIPUser += new clsService.DelsvcAddSIPUser(ClsYateSuperNode_EntsvcAddSIPUser);
            ((clsService)objHttpService).EntsvcGetConferenceNumber += new clsService.DelsvcGetConferenceNumber(ClsYateSuperNode_EntsvcGetConferenceNumber);
            ((clsService)objHttpService).EntsvcRemoveSIPUser += new clsService.DelsvcsvcRemoveSIPUser(ClsYateSuperNode_EntsvcRemoveSIPUser);

            BasicHttpServer bhsHttpBootStrap = new BasicHttpServer(ref objHttpService, "http://" + VMuktiInfo.CurrentPeer.SuperNodeIP + ":80/SNService");
            bhsHttpBootStrap.AddEndPoint<IService>("http://" + VMuktiInfo.CurrentPeer.SuperNodeIP + ":80/SNService");
            bhsHttpBootStrap.OpenServer();
            
        }
コード例 #4
0
        public ScreenRecordingServer()
        {
            screenReocrderServer = new clsHTTPScreenRecordingService();

            ((clsHTTPScreenRecordingService)screenReocrderServer).EntSvcjoin += new clsHTTPScreenRecordingService.delSvcJoin(ScreenRecordingServer_EntSvcjoin);
            ((clsHTTPScreenRecordingService)screenReocrderServer).EntSvcUnJoin += new clsHTTPScreenRecordingService.delSvcUnJoin(ScreenRecordingServer_EntSvcUnJoin);
            ((clsHTTPScreenRecordingService)screenReocrderServer).EntSvcStreamSuperNode += new clsHTTPScreenRecordingService.delStreamSuperNode(ScreenRecordingServer_EntSvcStreamSuperNode);
            ((clsHTTPScreenRecordingService)screenReocrderServer).EntReStream += new clsHTTPScreenRecordingService.delReStream(ScreenRecordingServer_EntReStream);
            ((clsHTTPScreenRecordingService)screenReocrderServer).EntStopRecording += new clsHTTPScreenRecordingService.delStopRecording(ScreenRecordingServer_EntStopRecording);


            BasicHttpServer bhsScreenRecordingServer = new BasicHttpServer(ref screenReocrderServer, "http://" + VMuktiInfo.CurrentPeer.SuperNodeIP + ":80/VMukti/ScreenRecording");
            bhsScreenRecordingServer.AddEndPoint<IHTTPScreenRecordingService>("http://" + VMuktiInfo.CurrentPeer.SuperNodeIP + ":80/VMukti/ScreenRecording");
            bhsScreenRecordingServer.OpenServer();
        }
コード例 #5
0
        public ScreenRecordingServer()
        {
            screenReocrderServer = new clsHTTPScreenRecordingService();

            ((clsHTTPScreenRecordingService)screenReocrderServer).EntSvcjoin            += new clsHTTPScreenRecordingService.delSvcJoin(ScreenRecordingServer_EntSvcjoin);
            ((clsHTTPScreenRecordingService)screenReocrderServer).EntSvcUnJoin          += new clsHTTPScreenRecordingService.delSvcUnJoin(ScreenRecordingServer_EntSvcUnJoin);
            ((clsHTTPScreenRecordingService)screenReocrderServer).EntSvcStreamSuperNode += new clsHTTPScreenRecordingService.delStreamSuperNode(ScreenRecordingServer_EntSvcStreamSuperNode);
            ((clsHTTPScreenRecordingService)screenReocrderServer).EntReStream           += new clsHTTPScreenRecordingService.delReStream(ScreenRecordingServer_EntReStream);
            ((clsHTTPScreenRecordingService)screenReocrderServer).EntStopRecording      += new clsHTTPScreenRecordingService.delStopRecording(ScreenRecordingServer_EntStopRecording);


            BasicHttpServer bhsScreenRecordingServer = new BasicHttpServer(ref screenReocrderServer, "http://" + VMuktiInfo.CurrentPeer.SuperNodeIP + ":80/VMukti/ScreenRecording");

            bhsScreenRecordingServer.AddEndPoint <IHTTPScreenRecordingService>("http://" + VMuktiInfo.CurrentPeer.SuperNodeIP + ":80/VMukti/ScreenRecording");
            bhsScreenRecordingServer.OpenServer();
        }
コード例 #6
0
ファイル: clsMailDBService.cs プロジェクト: xiaoliukai/VMukti
        //public static StringBuilder CreateTressInfo()
        //{
        //    StringBuilder sb = new StringBuilder();
        //    sb.Append("User Is : " + VMuktiAPI.VMuktiInfo.CurrentPeer.DisplayName);
        //    sb.AppendLine();
        //    sb.Append("Peer Type is : " + VMuktiAPI.VMuktiInfo.CurrentPeer.CurrPeerType.ToString());
        //    sb.AppendLine();
        //    sb.Append("User's SuperNode is : " + VMuktiAPI.VMuktiInfo.CurrentPeer.SuperNodeIP);
        //    sb.AppendLine();
        //    sb.Append("User's Machine Ip Address : " + VMuktiAPI.GetIPAddress.ClsGetIP4Address.GetIP4Address());
        //    sb.AppendLine();
        //    sb.AppendLine("----------------------------------------------------------------------------------------");
        //    return sb;
        //}

        public clsMailDBService()
        {
            objHttpMailDBService = new MailDBService();
            ((MailDBService)objHttpMailDBService).EntsvcJoin                   += new MailDBService.DelsvcJoin(clsMailDBService_EntsvcJoin);
            ((MailDBService)objHttpMailDBService).EntsvcExecuteDataSet         += new MailDBService.DelsvcExecuteDataSet(clsMailDBService_EntsvcExecuteDataSet);
            ((MailDBService)objHttpMailDBService).EntsvcExecuteNonQuery        += new MailDBService.DelsvcExecuteNonQuery(clsMailDBService_EntsvcExecuteNonQuery);
            ((MailDBService)objHttpMailDBService).EntsvcExecuteReturnNonQuery  += new MailDBService.DelsvcExecuteReturnNonQuery(clsMailDBService_EntsvcExecuteReturnNonQuery);
            ((MailDBService)objHttpMailDBService).EntsvcExecuteStoredProcedure += new MailDBService.DelsvcExecuteStoredProcedure(clsMailDBService_EntsvcExecuteStoredProcedure);
            ((MailDBService)objHttpMailDBService).EntsvcSendMail               += new MailDBService.DelsvcSendMail(clsMailDBService_EntsvcSendMail);
            ((MailDBService)objHttpMailDBService).EntsvcUnJoin                 += new MailDBService.DelsvcUnJoin(clsMailDBService_EntsvcUnJoin);

            BasicHttpServer bhsHttpMailDB = new BasicHttpServer(ref objHttpMailDBService, "http://" + VMuktiInfo.CurrentPeer.SuperNodeIP + ":80/VMukti/SNMailDB");

            bhsHttpMailDB.AddEndPoint <IClsMailDBService>("http://" + VMuktiInfo.CurrentPeer.SuperNodeIP + ":80/VMukti/SNMailDB");
            bhsHttpMailDB.OpenServer();
        }
コード例 #7
0
        //public static StringBuilder CreateTressInfo()
        //{
        //    StringBuilder sb = new StringBuilder();
        //    sb.Append("User Is : " + VMuktiAPI.VMuktiInfo.CurrentPeer.DisplayName);
        //    sb.AppendLine();
        //    sb.Append("Peer Type is : " + VMuktiAPI.VMuktiInfo.CurrentPeer.CurrPeerType.ToString());
        //    sb.AppendLine();
        //    sb.Append("User's SuperNode is : " + VMuktiAPI.VMuktiInfo.CurrentPeer.SuperNodeIP);
        //    sb.AppendLine();
        //    sb.Append("User's Machine Ip Address : " + VMuktiAPI.GetIPAddress.ClsGetIP4Address.GetIP4Address());
        //    sb.AppendLine();
        //    sb.AppendLine("----------------------------------------------------------------------------------------");
        //    return sb;
        //}

        public clsMailDBService()
        {
            objHttpMailDBService = new MailDBService();
            ((MailDBService)objHttpMailDBService).EntsvcJoin += new MailDBService.DelsvcJoin(clsMailDBService_EntsvcJoin);
            ((MailDBService)objHttpMailDBService).EntsvcExecuteDataSet += new MailDBService.DelsvcExecuteDataSet(clsMailDBService_EntsvcExecuteDataSet);
            ((MailDBService)objHttpMailDBService).EntsvcExecuteNonQuery += new MailDBService.DelsvcExecuteNonQuery(clsMailDBService_EntsvcExecuteNonQuery);
            ((MailDBService)objHttpMailDBService).EntsvcExecuteReturnNonQuery += new MailDBService.DelsvcExecuteReturnNonQuery(clsMailDBService_EntsvcExecuteReturnNonQuery);
            ((MailDBService)objHttpMailDBService).EntsvcExecuteStoredProcedure += new MailDBService.DelsvcExecuteStoredProcedure(clsMailDBService_EntsvcExecuteStoredProcedure);
            ((MailDBService)objHttpMailDBService).EntsvcSendMail += new MailDBService.DelsvcSendMail(clsMailDBService_EntsvcSendMail);
            ((MailDBService)objHttpMailDBService).EntsvcUnJoin += new MailDBService.DelsvcUnJoin(clsMailDBService_EntsvcUnJoin);

            BasicHttpServer bhsHttpMailDB = new BasicHttpServer(ref objHttpMailDBService, "http://" + VMuktiInfo.CurrentPeer.SuperNodeIP + ":80/VMukti/SNMailDB");
            bhsHttpMailDB.AddEndPoint<IClsMailDBService>("http://" + VMuktiInfo.CurrentPeer.SuperNodeIP + ":80/VMukti/SNMailDB");
            bhsHttpMailDB.OpenServer();
            

        }
コード例 #8
0
        public void RegHttpServer()
        {
            try
            {
                objClsHttpVideo = new ClsHttpSNodeVideo();
                ((ClsHttpSNodeVideo)objClsHttpVideo).EntsvcJoin             += new ClsHttpSNodeVideo.delsvcJoin(clsVideoSNode_EntsvcJoin);
                ((ClsHttpSNodeVideo)objClsHttpVideo).EntsvcStartVideoServer += new ClsHttpSNodeVideo.delsvcStartVideoServer(clsVideoSNode_EntsvcStartVideoServer);
                ((ClsHttpSNodeVideo)objClsHttpVideo).EntsvcUnJoin           += new ClsHttpSNodeVideo.delsvcUnJoin(clsVideoSNode_EntsvcUnJoin);

                HttpVideoServer = new BasicHttpServer(ref objClsHttpVideo, "http://" + VMuktiInfo.CurrentPeer.SuperNodeIP + ":80/NetP2PVideoHoster");
                HttpVideoServer.AddEndPoint <IHttpSNodeVideo>("http://" + VMuktiInfo.CurrentPeer.SuperNodeIP + ":80/NetP2PVideoHoster");
                HttpVideoServer.OpenServer();
            }
            catch (Exception ex)
            {
                VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "RegHttpServer", "clsVideoSNode.cs");
            }
        }
コード例 #9
0
ファイル: ClsYateSuperNode.cs プロジェクト: xiaoliukai/VMukti
        public ClsYateSuperNode()
        {
            try
            {
                objHttpService = new clsService();
                ((clsService)objHttpService).EntsvcAddSIPUser          += new clsService.DelsvcAddSIPUser(ClsYateSuperNode_EntsvcAddSIPUser);
                ((clsService)objHttpService).EntsvcGetConferenceNumber += new clsService.DelsvcGetConferenceNumber(ClsYateSuperNode_EntsvcGetConferenceNumber);
                ((clsService)objHttpService).EntsvcRemoveSIPUser       += new clsService.DelsvcsvcRemoveSIPUser(ClsYateSuperNode_EntsvcRemoveSIPUser);

                BasicHttpServer bhsHttpBootStrap = new BasicHttpServer(ref objHttpService, "http://" + VMuktiInfo.CurrentPeer.SuperNodeIP + ":80/SNService");
                bhsHttpBootStrap.AddEndPoint <IService>("http://" + VMuktiInfo.CurrentPeer.SuperNodeIP + ":80/SNService");
                bhsHttpBootStrap.OpenServer();
            }
            catch (Exception ex)
            {
                VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "ClsYateSuperNode()", "Audio\\ClsYateSuperNode.cs");
            }
        }
コード例 #10
0
        public void RegHttpServer(object httpUri)
        {
            try
            {
                objClsHttpUserVideo = new ClsHttpUserVideo();
                ((ClsHttpUserVideo)objClsHttpUserVideo).EntsvcJoin          += new ClsHttpUserVideo.delsvcJoin(UserVideoDummies_http_EntsvcJoin);
                ((ClsHttpUserVideo)objClsHttpUserVideo).EntsvcSendStream    += new ClsHttpUserVideo.delsvcSendStream(UserVideoDummies_http_EntsvcSendStream);
                ((ClsHttpUserVideo)objClsHttpUserVideo).EntsvcReceiveStream += new ClsHttpUserVideo.delsvcReceiveStream(UserVideoDummies_http_EntsvcReceiveStream);
                ((ClsHttpUserVideo)objClsHttpUserVideo).EntsvcUnJoin        += new ClsHttpUserVideo.delsvcUnJoin(UserVideoDummies_http_EntsvcUnJoin);

                HttpUserVideoServer = new BasicHttpServer(ref objClsHttpUserVideo, httpUri.ToString());
                HttpUserVideoServer.AddEndPoint <IHttpUserVideo>(httpUri.ToString());
                HttpUserVideoServer.OpenServer();
            }
            catch (Exception ex)
            {
                VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "RegHttpServer", "UserVideoDummies.cs");
            }
        }
コード例 #11
0
        public ClsYateSuperNode()
        {
            try
            {
                objHttpService = new clsService();
                ((clsService)objHttpService).EntsvcAddSIPUser += new clsService.DelsvcAddSIPUser(ClsYateSuperNode_EntsvcAddSIPUser);
                ((clsService)objHttpService).EntsvcGetConferenceNumber += new clsService.DelsvcGetConferenceNumber(ClsYateSuperNode_EntsvcGetConferenceNumber);
                ((clsService)objHttpService).EntsvcRemoveSIPUser += new clsService.DelsvcsvcRemoveSIPUser(ClsYateSuperNode_EntsvcRemoveSIPUser);

                BasicHttpServer bhsHttpBootStrap = new BasicHttpServer(ref objHttpService, "http://" + VMuktiInfo.CurrentPeer.SuperNodeIP + ":80/SNService");
                bhsHttpBootStrap.AddEndPoint<IService>("http://" + VMuktiInfo.CurrentPeer.SuperNodeIP + ":80/SNService");
                bhsHttpBootStrap.OpenServer();

            }
            catch (Exception ex)
            {
                VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "ClsYateSuperNode()", "Audio\\ClsYateSuperNode.cs");
            }
        }
コード例 #12
0
        public void RegHttpServer(object httpUri)
        {
            try
            {
                objClsHttpMainVideo = new ClsHttpMainVideo();
                ((ClsHttpMainVideo)objClsHttpMainVideo).EntsvcJoin += new ClsHttpMainVideo.delsvcJoin(MainVideoDummies_http_EntsvcJoin);
                ((ClsHttpMainVideo)objClsHttpMainVideo).EntsvcGetUserList += new ClsHttpMainVideo.delsvcGetUserList(MainVideoDummies_http_EntsvcGetUserList);
                ((ClsHttpMainVideo)objClsHttpMainVideo).EntsvcSetUserList += new ClsHttpMainVideo.delsvcSetUserList(MainVideoDummies_http_EntsvcSetUserList);
                ((ClsHttpMainVideo)objClsHttpMainVideo).EntsvcGetMessage += new ClsHttpMainVideo.delsvcGetMessage(MainVideoDummies_http_EntsvcGetMessage);
                ((ClsHttpMainVideo)objClsHttpMainVideo).EntsvcUnJoin += new ClsHttpMainVideo.delsvcUnJoin(MainVideoDummies_http_EntsvcUnJoin);

                HttpMainVideoServer = new BasicHttpServer(ref objClsHttpMainVideo, httpUri.ToString());
                HttpMainVideoServer.AddEndPoint<IHttpMainVideo>(httpUri.ToString());
                HttpMainVideoServer.OpenServer();
            }
            catch (Exception ex)
            {
                ex.Data.Add("My Key", "--RegHttpServer()---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);
            }
        }
コード例 #13
0
        public BootstrapServiceDomain()
        {
            try
            {

                #region Initialize global variables

                ClientConnectionString = @"Data Source=" + AppDomain.CurrentDomain.BaseDirectory + "AllocateConferenceNumber.sdf";
                strLocalDBPath = AppDomain.CurrentDomain.BaseDirectory + "AllocateConferenceNumber.sdf";
                lstsSuperNodeInfo = new List<string>();
                localSuperNodeInfo = new List<string>();
                dictFlashUrl = new Dictionary<int, string>();
                arr = new byte[5000];
                #endregion


                if (!System.IO.File.Exists(AppDomain.CurrentDomain.BaseDirectory.ToString() + "sqlceme35.dll"))
                {
                    new WebClient().DownloadFile(VMuktiAPI.VMuktiInfo.ZipFileDownloadLink + "sqlceme35.dll.zip", AppDomain.CurrentDomain.BaseDirectory.ToString() + "sqlceme35.dll");
                    new WebClient().DownloadFile(VMuktiAPI.VMuktiInfo.ZipFileDownloadLink + "sqlceqp35.dll.zip", AppDomain.CurrentDomain.BaseDirectory.ToString() + "sqlceqp35.dll");
                    new WebClient().DownloadFile(VMuktiAPI.VMuktiInfo.ZipFileDownloadLink + "sqlcese35.dll.zip", AppDomain.CurrentDomain.BaseDirectory.ToString() + "sqlcese35.dll");
                }

                if (!System.IO.File.Exists(AppDomain.CurrentDomain.BaseDirectory.ToString() + "AllocateConferenceNumber.sdf"))
                {
                    SqlCeEngine clientEngine = new SqlCeEngine(ClientConnectionString);
                    clientEngine.CreateDatabase();

                    LocalSQLConn = new SqlCeConnection();
                    LocalSQLConn.ConnectionString = ClientConnectionString;
                    LocalSQLConn.Open();

                    fncCreateSNNodeInfoTable();
                    fncCreateBuddyStatusTable();
                    fncCreateUserBuddyListTable();
                    fncCreateUserSuperNode_NodeInfoTable();
                    fncCreateUserSuperNodeInfoTable();
                    GetBuddyInfoFromServer();
                }
                else
                {
                    LocalSQLConn = new SqlCeConnection();
                    LocalSQLConn.ConnectionString = ClientConnectionString;
                    LocalSQLConn.Open();

                    fncSNInsertBuddy(VMuktiAPI.VMuktiInfo.BootStrapIPs[0], "Online");

                }
                awClientConnectionString = @"Data Source=" + AppDomain.CurrentDomain.BaseDirectory + "AllocateConferenceNumber.sdf";
                strCurrentMachineIP = VMuktiAPI.VMuktiInfo.CurrentPeer.CurrentMachineIP;


                #region HttpServerHoster 4 Performance

                BootStrapDelegates objBSDel = new BootStrapDelegates();

                objBSDel.EntHttpAddBuddy += new BootStrapDelegates.DelsvcHttpAddBuddy(BootstrapServiceDomain_EntHttpAddBuddy);
                objBSDel.EntHttpRemoveBuddy += new BootStrapDelegates.DelsvcRemoveAddBuddy(BootstrapServiceDomain_EntHttpRemoveBuddy);
                objBSDel.EntHttpBsGetSuperNodeIP += new BootStrapDelegates.DelsvcHttpBsGetSuperNodeIP(BootstrapServiceDomain_EntHttpBsGetSuperNodeIP);
                objBSDel.EntHttpBSJoin += new BootStrapDelegates.DelHttpBSJoin(BootstrapServiceDomain_EntHttpBSJoin);
                objBSDel.EntHttpBSUnJoin += new BootStrapDelegates.DelsvcHttpBSUnJoin(BootstrapServiceDomain_EntHttpBSUnJoin);
                objBSDel.EntHttpGetSuperNodeBuddyList += new BootStrapDelegates.DelsvcHttpGetSuperNodeBuddyList(BootstrapServiceDomain_EntHttpGetSuperNodeBuddyList);
                objBSDel.EntHttpBSAuthorizedUser += new BootStrapDelegates.DelsvcHttpBSAuthorizedUser(BootstrapServiceDomain_EntHttpBSAuthorizedUser);

                objBSDel.EntsvcGetNodeNameByIP += new BootStrapDelegates.DelsvcGetNodeNameByIP(BootstrapServiceDomain_EntsvcGetNodeNameByIP);
                objBSDel.EntHTTPGetOfflineNodeName += new BootStrapDelegates.DelsvcGetOfflineNodeName(BootstrapServiceDomain_EntHTTPGetOfflineNodeName);
                objBSDel.EntsvcGetAllBuddies += new BootStrapDelegates.DelsvcGetAllBuddies(BootstrapServiceDomain_EntsvcGetAllBuddies);
                objBSDel.EntsvcUpdateVMuktiVersion += new BootStrapDelegates.DelsvcUpdateVMuktiVersion(objBSDel_EntsvcUpdateVMuktiVersion);
                objHttpBootStrap = objBSDel;

                BasicHttpServer bhsHttpBootStrap = new BasicHttpServer(ref objHttpBootStrap, "http://" + VMuktiInfo.BootStrapIPs[0] + ":80/HttpBootStrap");
                bhsHttpBootStrap.AddEndPoint<IHTTPBootStrapService>("http://" + VMuktiInfo.BootStrapIPs[0] + ":80/HttpBootStrap");
                bhsHttpBootStrap.OpenServer();

                #endregion

                #region HttpDataBase Server

                try
                {
                    BootStrapDataBaseDelegates objBSDBDel = new BootStrapDataBaseDelegates();
                    objBSDBDel.EntHttpsvcjoin += new BootStrapDataBaseDelegates.DelHttpsvcJoin(objBSDBDel_EntHttpsvcjoin);
                    objBSDBDel.EntHttpExecuteDataSet += new BootStrapDataBaseDelegates.DelHttpExecuteDataSet(objBSDBDel_EntHttpExecuteDataSet);
                    objBSDBDel.EntHttpExecuteStoredProcedure += new BootStrapDataBaseDelegates.DelHttpExecuteStoredProcedure(objBSDBDel_EntHttpExecuteStoredProcedure);
                    objBSDBDel.EntHttpExecuteNonQuery += new BootStrapDataBaseDelegates.DelHttpExecuteNonQuery(objBSDBDel_EntHttpExecuteNonQuery);
                    objBSDBDel.EntHttpExecuteReturnNonQuery += new BootStrapDataBaseDelegates.DelHttpExecuteReturnNonQuery(objBSDBDel_EntHttpExecuteReturnNonQuery);

                    objHttpDatabaseBootStrap = objBSDBDel;

                    bhsHttpDataBase = new BasicHttpServer(ref objHttpDatabaseBootStrap, "http://" + VMuktiInfo.BootStrapIPs[0] + ":80/HttpDataBase");
                    bhsHttpDataBase.AddEndPoint<IHttpBootStrapDataBaseService>("http://" + VMuktiInfo.BootStrapIPs[0] + ":80/HttpDataBase");
                    bhsHttpDataBase.OpenServer();
                }
                catch (Exception ex)
                {
                    VMuktiHelper.ExceptionHandler(ex, "SuperNoeServiceDomain()--HttpDataBase Server()", "Domains\\SuperNodeServiceDomain.cs");
                }

                #endregion


                #region HTTP Server For File Transfer Service 4 Performance

                HTTPFileTransferDelegates objFileTransferDel = new HTTPFileTransferDelegates();
                objFileTransferDel.EntsvcHTTPFileTransferServiceJoin += new HTTPFileTransferDelegates.DelsvcHTTPFileTransferServiceJoin(BootstrapServiceDomain_EntsvcHTTPFileTransferServiceJoin);
                objFileTransferDel.EntsvcHTTPFileTransferServiceUploadFile += new HTTPFileTransferDelegates.DelsvcHTTPFileTransferServiceUploadFile(BootstrapServiceDomain_EntsvcHTTPFileTransferServiceUploadFile);
                objFileTransferDel.EntsvcHTTPFileTransferServiceUploadFileToInstallationDirectory += new HTTPFileTransferDelegates.DelsvcHTTPFileTransferServiceUploadFileToInstallationDirectory(BootstrapServiceDomain_EntsvcHTTPFileTransferServiceUploadFileToInstallationDirectory);
                objFileTransferDel.EntsvcHTTPFileTransferServiceDownloadFile += new HTTPFileTransferDelegates.DelsvcHTTPFileTransferServiceDownloadFile(BootstrapServiceDomain_EntsvcHTTPFileTransferServiceDownloadFile);

                object objHTTPFileTransfer = objFileTransferDel;

                bhsFileTransferServer = new BasicHttpServer(ref objHTTPFileTransfer, "http://" + VMuktiInfo.BootStrapIPs[0] + ":80/VMukti/HttpFileTransferService");
                bhsFileTransferServer.AddEndPoint<IHTTPFileTransferService>("http://" + VMuktiInfo.BootStrapIPs[0] + ":80/VMukti/HttpFileTransferService");
                bhsFileTransferServer.OpenServer();

                #endregion

                #region Http Server For Flash Video

                HttpFlashVideoDelegates objFlashVideoDel = new HttpFlashVideoDelegates();
                objFlashVideoDel.EntsvcHttpBSFVUnJoin += new HttpFlashVideoDelegates.DelsvcHttpBSFVUnJoin(objFlashVideo_EntsvcHttpBSFVUnJoin);
                objFlashVideoDel.EntsvcHttpBSFVJoin += new HttpFlashVideoDelegates.DelsvcHttpBSFVJoin(objFlashVideo_EntsvcHttpBSFVJoin);
                objFlashVideoDel.EntsvcHttpBSFVGetUrl += new HttpFlashVideoDelegates.DelsvcHttpBSFVGetUrl(objFlashVideo_EntsvcHttpBSFVGetUrl);
                objFlashVideoDel.EntsvcHttpBSFVCreateFolder += new HttpFlashVideoDelegates.DelsvcHttpBSFVCreateFolder(objFlashVideo_EntsvcHttpBSFVCreateFolder);

                object objFlashVideo = objFlashVideoDel;

                bhsFlashVideo = new BasicHttpServer(ref objFlashVideo, "http://" + VMuktiInfo.BootStrapIPs[0] + ":80/VMukti/HttpFlashVideo");
                bhsFlashVideo.AddEndPoint<IHttpBootStrapFlashVideo>("http://" + VMuktiInfo.BootStrapIPs[0] + ":80/VMukti/HttpFlashVideo");
                bhsFlashVideo.OpenServer();

                #endregion

                #region NetP2PServerHoster
                npsBootStrapServer = new NetPeerServer("net.tcp://" + VMuktiInfo.BootStrapIPs[0] + ":6000/NetP2PBootStrap");
                npsBootStrapServer.AddEndPoint("net.tcp://" + VMuktiInfo.BootStrapIPs[0] + ":6000/NetP2PBootStrap");
                npsBootStrapServer.OpenServer();



                //MessageBox.Show("netp2p server hosted");
                #endregion

                #region NetP2PConsoleServerHoster

                npsConsoleServer = new NetPeerServer("net.tcp://" + VMuktiAPI.VMuktiInfo.BootStrapIPs[0] + ":6000/NetP2PConsole");
                npsConsoleServer.AddEndPoint("net.tcp://" + VMuktiAPI.VMuktiInfo.BootStrapIPs[0] + ":6000/NetP2PConsole");
                npsConsoleServer.OpenServer();


                #endregion

                #region CallCenter Services
                if (VMuktiAPI.VMuktiInfo.VMuktiVersion.ToString() == "1.1")
                {
                    #region NetP2PPrictiveServerHoster
                    npsBootStrapPredictviveServer = new NetPeerServer("net.tcp://" + VMuktiInfo.BootStrapIPs[0] + ":6000/NetP2PBootStrapPredictive");
                    npsBootStrapPredictviveServer.AddEndPoint("net.tcp://" + VMuktiInfo.BootStrapIPs[0] + ":6000/NetP2PBootStrapPredictive");
                    npsBootStrapPredictviveServer.OpenServer();
                    #endregion

                    #region Hosting DashBoard Server
                    npsBootStrapDashBoardService = new NetPeerServer("net.tcp://" + VMuktiInfo.BootStrapIPs[0] + ":6000/NetP2PBootStrapDashBoard");
                    npsBootStrapDashBoardService.AddEndPoint("net.tcp://" + VMuktiInfo.BootStrapIPs[0] + ":6000/NetP2PBootStrapDashBoard");
                    npsBootStrapDashBoardService.OpenServer();
                    #endregion

                    # region Hosting Active Agent Server
                    npsBootStrapActiveAgentReportService = new NetPeerServer("net.tcp://" + VMuktiInfo.BootStrapIPs[0] + ":6000/NetP2PBootStrapActiveAgentReport");
                    npsBootStrapActiveAgentReportService.AddEndPoint("net.tcp://" + VMuktiInfo.BootStrapIPs[0] + ":6000/NetP2PBootStrapActiveAgentReport");
                    npsBootStrapActiveAgentReportService.OpenServer();
                    #endregion


                    #region Server For Uploading Recorded Calls


                    npsRecordingServer = new NetPeerServer("net.tcp://" + VMuktiInfo.BootStrapIPs[0] + ":6000/NetP2PBootStrapRecordedFiles");
                    npsRecordingServer.AddEndPoint("net.tcp://" + VMuktiInfo.BootStrapIPs[0] + ":6000/NetP2PBootStrapRecordedFiles");
                    npsRecordingServer.OpenServer();

                    #endregion

                    #region Client For Uploading Recorded Calls 4 Performance

                    NetPeerClient npcRecordingClient = new NetPeerClient();
                    object objP2PRecording = new NetP2PBootStrapRecordedFileDelegate();

                    ((NetP2PBootStrapRecordedFileDelegate)objP2PRecording).EntsvcRecordedFileJoin += new NetP2PBootStrapRecordedFileDelegate.delsvcRecordedFileJoin(objP2PRecording_EntsvcRecordedFileJoin);
                    ((NetP2PBootStrapRecordedFileDelegate)objP2PRecording).EntsvcSendRecordedFiles += new NetP2PBootStrapRecordedFileDelegate.delsvcSendRecordedFiles(objP2PRecording_EntsvcSendRecordedFiles);
                    ((NetP2PBootStrapRecordedFileDelegate)objP2PRecording).EntsvcRecordedFileUnJoin += new NetP2PBootStrapRecordedFileDelegate.delsvcRecordedFileUnJoin(objP2PRecording_EntsvcRecordedFileUnJoin);
                    //objNetP2PRecording = objP2PRecording;
                    clientNetP2pChannelRecording = (INetP2PBootStrapRecordedFileChannel)npcRecordingClient.OpenClient<INetP2PBootStrapRecordedFileChannel>("net.tcp://" + VMuktiInfo.BootStrapIPs[0] + ":6000/NetP2PBootStrapRecordedFiles", "P2PRecordedFiles", ref objP2PRecording);

                    VMukti.Business.CommonMessageContract.clsMessageContract objContract = new VMukti.Business.CommonMessageContract.clsMessageContract();
                    objContract.uname = VMuktiAPI.VMuktiInfo.CurrentPeer.DisplayName;
                    objContract.fName = "";
                    objContract.fExtension = "";
                    objContract.fLength = 0;
                    objContract.fStream = new MemoryStream();

                    clientNetP2pChannelRecording.svcRecordedFileJoin(objContract);
                    #endregion
                }
                #endregion

                #region Disaster Recovery

                //fncMakeAllBuddyOffline();

                #endregion

            }
            catch (Exception ex)
            {
                VMuktiHelper.ExceptionHandler(ex, "BootstrapServiceDomain()", "Domains\\BootstrapServiceDomain.cs");                               
            }
        }
コード例 #14
0
        public void RegHttpServer()
        {
            try
            {
                objClsHttpVideo = new ClsHttpSNodeVideo();
                ((ClsHttpSNodeVideo)objClsHttpVideo).EntsvcJoin += new ClsHttpSNodeVideo.delsvcJoin(clsVideoSNode_EntsvcJoin);
                ((ClsHttpSNodeVideo)objClsHttpVideo).EntsvcStartVideoServer += new ClsHttpSNodeVideo.delsvcStartVideoServer(clsVideoSNode_EntsvcStartVideoServer);
                ((ClsHttpSNodeVideo)objClsHttpVideo).EntsvcUnJoin += new ClsHttpSNodeVideo.delsvcUnJoin(clsVideoSNode_EntsvcUnJoin);

                HttpVideoServer = new BasicHttpServer(ref objClsHttpVideo, "http://" + VMuktiInfo.CurrentPeer.SuperNodeIP + ":80/NetP2PVideoHoster");
                HttpVideoServer.AddEndPoint<IHttpSNodeVideo>("http://" + VMuktiInfo.CurrentPeer.SuperNodeIP + ":80/NetP2PVideoHoster");
                HttpVideoServer.OpenServer();
                
            }
            catch (Exception ex)
            {
                VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "RegHttpServer", "clsVideoSNode.cs");
            }
        }
コード例 #15
0
        public void RegHttpServer(object httpUri)
        {
            try
            {
                objClsHttpUserVideo = new ClsHttpUserVideo();
                ((ClsHttpUserVideo)objClsHttpUserVideo).EntsvcJoin += new ClsHttpUserVideo.delsvcJoin(UserVideoDummies_http_EntsvcJoin);
                ((ClsHttpUserVideo)objClsHttpUserVideo).EntsvcSendStream += new ClsHttpUserVideo.delsvcSendStream(UserVideoDummies_http_EntsvcSendStream);
                ((ClsHttpUserVideo)objClsHttpUserVideo).EntsvcReceiveStream += new ClsHttpUserVideo.delsvcReceiveStream(UserVideoDummies_http_EntsvcReceiveStream);
                ((ClsHttpUserVideo)objClsHttpUserVideo).EntsvcUnJoin += new ClsHttpUserVideo.delsvcUnJoin(UserVideoDummies_http_EntsvcUnJoin);

                HttpUserVideoServer = new BasicHttpServer(ref objClsHttpUserVideo, httpUri.ToString());
                HttpUserVideoServer.AddEndPoint<IHttpUserVideo>(httpUri.ToString());
                HttpUserVideoServer.OpenServer();
            }
            catch (Exception ex)
            {
                VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "RegHttpServer", "UserVideoDummies.cs");             
            }
        }
コード例 #16
0
ファイル: App.xaml.cs プロジェクト: jiangguang5201314/VMukti
        bool FncPort80Free()
        {
            try
            {
                object objHttpBootStrap = null;
                objHttpBootStrap = new BootStrapDelegates();
                BasicHttpServer bhsHttpBootStrap = new BasicHttpServer(ref objHttpBootStrap, "http://" + VMuktiAPI.VMuktiInfo.CurrentPeer.CurrentMachineIP + ":80/HttpBootStrap");
                bhsHttpBootStrap.AddEndPoint<IHTTPBootStrapService>("http://" + VMuktiAPI.VMuktiInfo.CurrentPeer.CurrentMachineIP + ":80/HttpBootStrap");
                bhsHttpBootStrap.OpenServer();
                bhsHttpBootStrap.CloseServer();
                return true;
            }
            catch (Exception ex)
            {
                VMuktiHelper.ExceptionHandler(ex, "FncPort80busy()", "App.xaml.cs");
                return false;
            }

        }