コード例 #1
0
ファイル: ChatDummy.cs プロジェクト: jiangguang5201314/VMukti
        void RegHttpServer(object httpUri)
        {
            try
            {
                objHttpChat = new clsHttpChat();
                ((clsHttpChat)objHttpChat).EntsvcJoin += new Chat.Business.Service.BasicHttp.clsHttpChat.delsvcJoin(objHttp_EntsvcJoin);
                ((clsHttpChat)objHttpChat).EntsvcSendMessage += new Chat.Business.Service.BasicHttp.clsHttpChat.delsvcSendMessage(objHttp_EntsvcSendMessage);
                ((clsHttpChat)objHttpChat).EntsvcGetMessages += new Chat.Business.Service.BasicHttp.clsHttpChat.delsvcGetMessages(objHttp_EntsvcGetMessages);
                ((clsHttpChat)objHttpChat).EntsvcGetUserList += new clsHttpChat.delsvcGetUserList(objHttp_EntsvcGetUserList);
                ((clsHttpChat)objHttpChat).EntsvcSetUserList += new clsHttpChat.delsvcSetUserList(objHttp_EntsvcSetUserList);

                ((clsHttpChat)objHttpChat).EntsvcSignOutChat += new clsHttpChat.delsvcSignOutChat(objHttp_EntsvcSignOutChat);
                ((clsHttpChat)objHttpChat).EntsvcUnJoin += new Chat.Business.Service.BasicHttp.clsHttpChat.delsvcUnJoin(objHttp_EntsvcUnJoin);
                ((clsHttpChat)objHttpChat).EntsvcShowStatus += new clsHttpChat.delsvcShowStatus(objHttp_EntsvcShowStatus);

                HttpChatServer = new BasicHttpServer(ref objHttpChat, httpUri.ToString());
                HttpChatServer.AddEndPoint<Chat.Business.Service.BasicHttp.IHttpChat>(httpUri.ToString());
                HttpChatServer.OpenServer();
            }
            catch (Exception ex)
            {
                VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "RegHttpServer", "ChatDummy.cs");
            }                                             
        }
コード例 #2
0
        void GlobalVariable()
        {
            try
            {
                objNetTcpChat = new clsNetTcpChat();
                objHttpChat = new clsHttpChat();
                temp = 0;
                tempcounter = 0;
                blnTypingStatus = false;
                blnSendTypeMsg = true;
                //arr = new byte[5000];
                lstName = new List<string>();
                lstTypingUsers = new List<string>();
                isChatHistoryFolderCreated = false;
                isChatHistoryEnabled = true;


                objDelDisplayName = new DelDisplayName(DisplayName);

                objDelSendMsg = new DelSendMessage(delSendMessage);
                objDelSignOutMsg = new DelSignOutMessage(delSignoutMessage);

                objDelSendPeerMsg = new DelSendPeerMessage(delSendPeerMessage);
                objDelGetUserList = new DelGetUserList(delGetUserList);
                objDelUserTypeing = new DelShowUserTypeing(delShowUserTypeMessage);
                objDelTextDownEvent = new DelTextDownEvent(delTextDownEvent);
                objDelAsyncGetMessage = new DelAsyncGetMessage(delAsyncGetMessage);
            
            }
            catch (Exception ex)
            {
                MessageBox.Show("GlobalVariable" +  ex.Message);
            }
        }