/** * 清空连接对应的请求内容 * * @param socket */ public static void clearClientRequest(AsynchronousSocketChannel socket) { ClientConnection value = allClientSocket.get(socket); if (value != null) { value.clientRequest = ""; } }
/** * 合并该连接对应的请求内容 * * @param socket * @param value * @return */ public static String combineClientRequest(AsynchronousSocketChannel socket, String value) { ClientConnection oldValue = allClientSocket.get(socket); if (oldValue != null) { return oldValue.clientRequest = oldValue.clientRequest + value; } else return ""; }