sendmsgtoall.java
来自「flex实现的前台」· Java 代码 · 共 26 行
JAVA
26 行
/**
*
*/
package cn.humanmonth.chat.server.protocol.response;
import cn.humanmonth.chat.server.domain.RequestData;
import cn.humanmonth.chat.server.protocol.Protocol;
import cn.humanmonth.framework.view.XmlUtil;
/**
* @author Piterlin
*
*/
public class SendMsgToAll {
private static String action="sendMsgToAllBack";
public void sendMsgToAll(RequestData requestData, Protocol protocol) {
protocol.sendStringToAllClient(XmlUtil.getStartTag(action)+"("+protocol.getUser().getUserNameDetail()+"):"+requestData.getRequestString()+XmlUtil.getEndTag(action));
}
public void sendSystemMsg(String msg,Protocol protocol){
protocol.sendStringToAllClient(XmlUtil.getStartTag(action)+"(系统信息):"+msg+XmlUtil.getEndTag(action));
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?