/// <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)); }
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); }