use of net.runelite.http.api.ws.WebsocketMessage in project runelite by runelite.
the class WSService method onMessage.
@OnMessage
public void onMessage(Session session, String text) {
WebsocketMessage message = gson.fromJson(text, WebsocketMessage.class);
logger.info("Got message: {}", message);
if (message instanceof Handshake) {
Handshake hs = (Handshake) message;
uuid = hs.getSession();
}
}
use of net.runelite.http.api.ws.WebsocketMessage in project runelite by runelite.
the class WSClient method onMessage.
@Override
public void onMessage(WebSocket webSocket, String text) {
WebsocketMessage message = GSON.fromJson(text, WebsocketMessage.class);
log.debug("Got message: {}", message);
eventBus.post(message);
}
Aggregations