package com.web; import java.util.ArrayList; import java.util.List; import javax.servlet.http.HttpServletRequest; import org.apache.catalina.websocket.StreamInbound; import org.apache.catalina.websocket.WebSocketServlet; public class EchoServlet extends WebSocketServlet { private static final long serialVersionUID = -4104682919545889813L; private static List<MyMessageInbound> socketList = new ArrayList<MyMessageInbound>(); @Override protected StreamInbound createWebSocketInbound(String subProtocol, HttpServletRequest request) { System.out.println("已连接"); return new MyMessageInbound(); } public static synchronized List<MyMessageInbound> getSocketList() { return socketList; } }
最近下载更多
wuying8208 LV15
2023年7月1日
WASDZZ LV13
2022年7月25日
sjc199 LV2
2022年6月13日
wanglinddad LV54
2022年4月17日
waityou2000317 LV4
2022年3月10日
luweiyuan LV3
2020年12月8日
doremi LV6
2020年5月17日
dhb123 LV5
2020年5月1日
shiqianxi LV1
2020年2月19日
taylor503 LV6
2019年12月9日
最近浏览更多
dafeiyu LV10
3月1日
张英伟
2023年12月29日
暂无贡献等级
3263394665 LV9
2023年12月1日
wuying8208 LV15
2023年7月1日
小白会染色
2023年6月29日
暂无贡献等级
gayalee
2023年6月9日
暂无贡献等级
tangruirui
2023年5月23日
暂无贡献等级
微信网友_6444139264921600 LV6
2023年4月29日
xiexiaoming05 LV14
2023年1月11日
kkkkks LV1
2022年12月30日