Exemple #1
0
        public void SendSearchMessage()
        {
            string SocketNo = "05";

            HeaderHandler.header headerHandler = new HeaderHandler.header();
            if (CommonData.userSocket != null)
            {
                CommonData.userSocket.Send(headerHandler.HeadleDataSend(SocketNo, CommonData.userDomain.UserId));
            }
        }
Exemple #2
0
        public void SendStateChange(string state)
        {
            string SocketNo = "03";

            HeaderHandler.header headerHandler = new HeaderHandler.header();
            if (CommonData.userSocket != null)
            {
                CommonData.userSocket.Send(headerHandler.HeadleDataSend(SocketNo, CommonData.userDomain.UserId + state));
            }
        }
Exemple #3
0
        public void SendSearchProf(string name)
        {
            string SocketNo = "04";

            HeaderHandler.header headerHandler = new HeaderHandler.header();
            if (CommonData.userSocket != null)
            {
                CommonData.userSocket.Send(headerHandler.HeadleDataSend(SocketNo, name));
            }
        }
Exemple #4
0
        public void SendLogin()
        {
            string SocketNo = "01";

            HeaderHandler.header headerHandler = new HeaderHandler.header();
            if (CommonData.userSocket != null)
            {
                CommonData.userSocket.Send(headerHandler.HeadleDataSend(SocketNo, CommonData.userDomain.UserId + CommonData.userDomain.UserPasswd));
            }
        }
Exemple #5
0
        private void Socket_OnReceived(AsyncSocketClient asyncSocketClient, byte[] value)
        {
            try
            {
                HeaderHandler.header head = new HeaderHandler.header();
                head.HandleDataReceive(value);

                switch (head.SocketNo)
                {
                case "11":    // 로그인 ACK
                    SocketReceivedLoginEvent?.Invoke(head.Body);

                    break;

                default:
                    SocketReceivedMainEvent?.Invoke(head.SocketNo, head.Body);
                    break;

                    /*case "12":// 로그아웃 ACK
                     *  SocketReceivedMainEvent?.Invoke(head.SocketNo, head.Body);
                     *  break;
                     * case "13":// 상태 변경 ACK
                     *  SocketReceivedMainEvent?.Invoke(head.SocketNo, head.Body);
                     *  break;
                     * case "14":// 특정 교수 검색 ACK
                     *  SocketReceivedMainEvent?.Invoke(head.SocketNo, head.Body);
                     *  break;
                     * case "15":// 메시지 조회 ACK
                     *  SocketReceivedMainEvent?.Invoke(head.SocketNo, head.Body);
                     *  break;
                     * case "16":// 메시지 답장 ACK
                     *  SocketReceivedMainEvent?.Invoke(head.SocketNo, head.Body);
                     *  break;*/
                }
            }
            catch (Exception ex)
            {
                Logger.All.Debug(ex);
            }
        }