From 2291beb5e77585c95c2149a53596e0c24b7f427d Mon Sep 17 00:00:00 2001 From: Redkale <22250530@qq.com> Date: Mon, 29 May 2017 16:35:11 +0800 Subject: [PATCH] --- src/org/redkale/net/http/WebSocketEngine.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/org/redkale/net/http/WebSocketEngine.java b/src/org/redkale/net/http/WebSocketEngine.java index 6f8de451a..c31cea401 100644 --- a/src/org/redkale/net/http/WebSocketEngine.java +++ b/src/org/redkale/net/http/WebSocketEngine.java @@ -138,12 +138,12 @@ public final class WebSocketEngine { CompletableFuture future = null; if (single) { for (WebSocket websocket : websockets.values()) { - future = future == null ? websocket.send(message, last) : future.thenCombine(websocket.send(message, last), (a, b) -> a | (Integer) b); + future = future == null ? websocket.sendPacket(packet) : future.thenCombine(websocket.sendPacket(packet), (a, b) -> a | (Integer) b); } } else { for (List list : websockets2.values()) { for (WebSocket websocket : list) { - future = future == null ? websocket.send(message, last) : future.thenCombine(websocket.send(message, last), (a, b) -> a | (Integer) b); + future = future == null ? websocket.sendPacket(packet) : future.thenCombine(websocket.sendPacket(packet), (a, b) -> a | (Integer) b); } } } @@ -181,14 +181,14 @@ public final class WebSocketEngine { for (Serializable userid : userids) { WebSocket websocket = websockets.get(userid); if (websocket == null) continue; - future = future == null ? websocket.send(message, last) : future.thenCombine(websocket.send(message, last), (a, b) -> a | (Integer) b); + future = future == null ? websocket.sendPacket(packet) : future.thenCombine(websocket.sendPacket(packet), (a, b) -> a | (Integer) b); } } else { for (Serializable userid : userids) { List list = websockets2.get(userid); if (list == null) continue; for (WebSocket websocket : list) { - future = future == null ? websocket.send(message, last) : future.thenCombine(websocket.send(message, last), (a, b) -> a | (Integer) b); + future = future == null ? websocket.sendPacket(packet) : future.thenCombine(websocket.sendPacket(packet), (a, b) -> a | (Integer) b); } } }