Beispiel #1
0
        /// <summary>
        /// 응답메시지를 수신한다.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void OnMessageReceived(object sender, IoSessionMessageEventArgs e)
        {
            PostStarMessage starMessage = (PostStarMessage)e.Message;

            Console.WriteLine(String.Format("{0} : ", starMessage.getSender().nickName));
            Console.WriteLine(String.Format("{0}", starMessage.text));
        }
Beispiel #2
0
        protected virtual void ReceivePoststarMessage(IoSession session, PostStarMessage starMessage)
        {
            Console.WriteLine(String.Format("{0}", starMessage.text));

            PostStarMessage reStarMessage = new PostStarMessage(starMessage.getSender());

            reStarMessage.text = "잘 받았어요.";
            session.Write(reStarMessage);
        }