diff --git a/nx01-no2all-react-nostr/src/test/java/love/distributedrebirth/no2all/react/nostr/client/NoStrClientTest.java b/nx01-no2all-react-nostr/src/test/java/love/distributedrebirth/no2all/react/nostr/client/NoStrClientTest.java index acb52e9..f200c05 100644 --- a/nx01-no2all-react-nostr/src/test/java/love/distributedrebirth/no2all/react/nostr/client/NoStrClientTest.java +++ b/nx01-no2all-react-nostr/src/test/java/love/distributedrebirth/no2all/react/nostr/client/NoStrClientTest.java @@ -80,7 +80,7 @@ public class NoStrClientTest { react.fire(clientSlot, new No2AllActClientConnect()); }); - OjwWireClientEndpoint clientEndpoint = new OjwWireClientEndpoint(new URI("ws://localhost:8080/event")); + OjwWireClientEndpoint clientEndpoint = new OjwWireClientEndpoint(new URI("ws://localhost:8080/ws/nostr")); System.out.println("NoStrClient start"); react.fire(No2AllRtsClient.API, new No2AllActClient(clientEndpoint)); diff --git a/nx01-no2all-wire-jetty/src/test/java/love/distributedrebirth/no2all/wire/jetty/EventClient.java b/nx01-no2all-wire-jetty/src/test/java/love/distributedrebirth/no2all/wire/jetty/EventClient.java index 80d4026..56e4ee8 100644 --- a/nx01-no2all-wire-jetty/src/test/java/love/distributedrebirth/no2all/wire/jetty/EventClient.java +++ b/nx01-no2all-wire-jetty/src/test/java/love/distributedrebirth/no2all/wire/jetty/EventClient.java @@ -27,7 +27,7 @@ public class EventClient implements WireClientHandler { public EventClient() throws URISyntaxException { client = new WebSocketClient(); - endpoint1 = new JettyWireClientEndpoint(new URI("ws://localhost:8080"), client); + endpoint1 = new JettyWireClientEndpoint(new URI("ws://localhost:8080/ws/text"), client); } public void start() throws Exception { diff --git a/nx01-no2all-wire-jetty/src/test/java/love/distributedrebirth/no2all/wire/jetty/EventServer.java b/nx01-no2all-wire-jetty/src/test/java/love/distributedrebirth/no2all/wire/jetty/EventServer.java index fbe8c50..bd86dc9 100644 --- a/nx01-no2all-wire-jetty/src/test/java/love/distributedrebirth/no2all/wire/jetty/EventServer.java +++ b/nx01-no2all-wire-jetty/src/test/java/love/distributedrebirth/no2all/wire/jetty/EventServer.java @@ -37,7 +37,6 @@ public class EventServer { private final ServerConnector connector; private JettyWireServerEndpoint endpoint1; private JettyWireServerEndpoint endpoint2; - private JettyWireServerEndpoint endpoint3; public EventServer() { server = new Server(); @@ -48,9 +47,8 @@ public class EventServer { server.setHandler(context); JettyWebSocketServletContainerInitializer.configure(context, (servletContext, wsContainer) -> { wsContainer.setMaxTextMessageSize(65535); - endpoint1 = new JettyWireServerEndpoint(wsContainer, "/"); - endpoint2 = new JettyWireServerEndpoint(wsContainer, "/event"); - endpoint3 = new JettyWireServerEndpoint(wsContainer, "/other"); + endpoint1 = new JettyWireServerEndpoint(wsContainer, "/ws/text"); + endpoint2 = new JettyWireServerEndpoint(wsContainer, "/ws/bin"); }); server.addEventListener(new Listener() { @@ -74,7 +72,6 @@ public class EventServer { }); react.fire(No2AllRtsServer.API, new No2AllActServer(endpoint1)); react.fire(No2AllRtsServer.API, new No2AllActServer(endpoint2)); - react.fire(No2AllRtsServer.API, new No2AllActServer(endpoint3)); } }); } diff --git a/nx01-no2all-zerofungus/src/main/java/love/distributedrebirth/no2all/zerofungus/service/ZFunRtsConfigJetty.java b/nx01-no2all-zerofungus/src/main/java/love/distributedrebirth/no2all/zerofungus/service/ZFunRtsConfigJetty.java index 5d482b7..173baf7 100644 --- a/nx01-no2all-zerofungus/src/main/java/love/distributedrebirth/no2all/zerofungus/service/ZFunRtsConfigJetty.java +++ b/nx01-no2all-zerofungus/src/main/java/love/distributedrebirth/no2all/zerofungus/service/ZFunRtsConfigJetty.java @@ -36,9 +36,9 @@ public final class ZFunRtsConfigJetty implements No2AllReactTypeScript { private static final Logger logger = Logger.getLogger(ZFunRtsConfigJetty.class.getName()); private final Server server; private final ServerConnector connector; - private JettyWireServerEndpoint endpoint1; - private JettyWireServerEndpoint endpoint2; - private JettyWireServerEndpoint endpoint3; + private JettyWireServerEndpoint wsNostr; + private JettyWireServerEndpoint wsHyper; + private JettyWireServerEndpoint wsNether; public ZFunRtsConfigJetty(int port) { server = new Server(); @@ -64,12 +64,13 @@ public final class ZFunRtsConfigJetty implements No2AllReactTypeScript { JettyWebSocketServletContainerInitializer.configure(context, (servletContext, wsContainer) -> { wsContainer.setMaxTextMessageSize(65535); - endpoint1 = new JettyWireServerEndpoint(wsContainer, "/con1"); - endpoint2 = new JettyWireServerEndpoint(wsContainer, "/event"); - endpoint3 = new JettyWireServerEndpoint(wsContainer, "/other"); + wsNostr = new JettyWireServerEndpoint(wsContainer, "/ws/nostr"); + wsHyper = new JettyWireServerEndpoint(wsContainer, "/ws/hyper"); + wsNether = new JettyWireServerEndpoint(wsContainer, "/ws/nether"); }); logger.info("Add H2 console on: /debug/jdbc/console"); + // TODO: upgrade jetty, H2 has added "JakartaWebServlet" context.addServlet("org.h2.server.web.WebServlet", "/debug/jdbc/console/*"); context.addServlet(RedirectServlet.class, "/test"); @@ -87,9 +88,9 @@ public final class ZFunRtsConfigJetty implements No2AllReactTypeScript { server.addEventListener(new Listener() { @Override public void lifeCycleStarted(LifeCycle event) { - react.fire(No2AllRtsServer.API, new No2AllActServer(endpoint1)); - react.fire(No2AllRtsServer.API, new No2AllActServer(endpoint2)); - react.fire(No2AllRtsServer.API, new No2AllActServer(endpoint3)); + react.fire(No2AllRtsServer.API, new No2AllActServer(wsNostr)); // text + react.fire(No2AllRtsServer.API, new No2AllActServer(wsHyper)); // text + bin + react.fire(No2AllRtsServer.API, new No2AllActServer(wsNether)); // bin } }); try {