List of usage examples for io.netty.handler.codec.http.websocketx WebSocketFrame duplicate
@Override
public WebSocketFrame duplicate()
From source file:org.wso2.carbon.inbound.endpoint.protocol.websocket.management.WebsocketSubscriberPathManager.java
License:Open Source License
public void broadcastOnSubscriberPath(WebSocketFrame frame, String inboundName, String subscriberPath) { List<InboundWebsocketChannelContext> contextList = getSubscriberPathChannelContextList(inboundName, subscriberPath);//from w ww . j av a 2s. c o m for (InboundWebsocketChannelContext context : contextList) { WebSocketFrame duplicatedFrame = frame.duplicate(); context.writeToChannel(duplicatedFrame); } }
From source file:org.wso2.carbon.inbound.endpoint.protocol.websocket.management.WebsocketSubscriberPathManager.java
License:Open Source License
public void exclusiveBroadcastOnSubscriberPath(WebSocketFrame frame, String inboundName, String subscriberPath, InboundWebsocketChannelContext ctx) { List<InboundWebsocketChannelContext> contextList = getSubscriberPathChannelContextList(inboundName, subscriberPath);//ww w .j ava 2 s . c om for (InboundWebsocketChannelContext context : contextList) { if (!context.getChannelIdentifier().equals(ctx.getChannelIdentifier())) { WebSocketFrame duplicatedFrame = frame.duplicate(); context.writeToChannel(duplicatedFrame); } } }