Add WebSocket support with routing, origin validation, session management, and broadcasting

This commit is contained in:
CodingPhoenixx
2026-05-28 13:23:23 +02:00
parent b75e1e5c6e
commit 994e7fa80c
11 changed files with 799 additions and 4 deletions
@@ -0,0 +1,19 @@
package dev.coph.nextusweb.server.websocket;
public interface WebSocketHandler {
default void onOpen(WebSocketSession session) throws Exception {
}
default void onMessage(WebSocketSession session, String message) throws Exception {
}
default void onBinary(WebSocketSession session, byte[] data) throws Exception {
}
default void onClose(WebSocketSession session, int code, String reason) throws Exception {
}
default void onError(WebSocketSession session, Throwable cause) throws Exception {
}
}