public static void websocketBroadcast(final Context context, final Publisher<String> broadcaster) {
websocket(context, new AutoCloseWebSocketHandler<AutoCloseable>() {
@Override
public AutoCloseable onOpen(final WebSocket webSocket) throws Exception {
WebsocketBroadcastSubscriber subscriber = new WebsocketBroadcastSubscriber(webSocket);
context.stream(broadcaster).subscribe(subscriber);
return subscriber;
}
});
}