예제 #1
0
파일: Handler.cs 프로젝트: hdxhan/IKendeLib
        public void Say(string Content)
        {
            IChannel channel = MethodContext.Current.Channel;
            JsonMessage msg = new JsonMessage();
            SayText st = new SayText();
            st.Name = channel.Name;
            st.ID = channel.ClientID;
            st.Date = DateTime.Now;
            st.Content = Content;
            st.IP = channel.EndPoint.ToString();
            msg.type = "say";
            msg.data = st;
            foreach (IChannel item in channel.Server.GetOnlines())
            {
                item.Send(msg);
            }

        }
예제 #2
0
        public void Say(string Content)
        {
            IChannel    channel = MethodContext.Current.Channel;
            JsonMessage msg     = new JsonMessage();
            SayText     st      = new SayText();

            st.Name    = channel.Name;
            st.ID      = channel.ClientID;
            st.Date    = DateTime.Now;
            st.Content = Content;
            st.IP      = channel.EndPoint.ToString();
            msg.type   = "say";
            msg.data   = st;
            foreach (IChannel item in channel.Server.GetOnlines())
            {
                item.Send(msg);
            }
        }