Updated ws paths.
This commit is contained in:
parent
ba534872b9
commit
13842c11fa
|
@ -80,7 +80,7 @@ public class NoStrClientTest {
|
||||||
react.fire(clientSlot, new No2AllActClientConnect());
|
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");
|
System.out.println("NoStrClient start");
|
||||||
react.fire(No2AllRtsClient.API, new No2AllActClient(clientEndpoint));
|
react.fire(No2AllRtsClient.API, new No2AllActClient(clientEndpoint));
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ public class EventClient implements WireClientHandler {
|
||||||
|
|
||||||
public EventClient() throws URISyntaxException {
|
public EventClient() throws URISyntaxException {
|
||||||
client = new WebSocketClient();
|
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 {
|
public void start() throws Exception {
|
||||||
|
|
|
@ -37,7 +37,6 @@ public class EventServer {
|
||||||
private final ServerConnector connector;
|
private final ServerConnector connector;
|
||||||
private JettyWireServerEndpoint endpoint1;
|
private JettyWireServerEndpoint endpoint1;
|
||||||
private JettyWireServerEndpoint endpoint2;
|
private JettyWireServerEndpoint endpoint2;
|
||||||
private JettyWireServerEndpoint endpoint3;
|
|
||||||
|
|
||||||
public EventServer() {
|
public EventServer() {
|
||||||
server = new Server();
|
server = new Server();
|
||||||
|
@ -48,9 +47,8 @@ public class EventServer {
|
||||||
server.setHandler(context);
|
server.setHandler(context);
|
||||||
JettyWebSocketServletContainerInitializer.configure(context, (servletContext, wsContainer) -> {
|
JettyWebSocketServletContainerInitializer.configure(context, (servletContext, wsContainer) -> {
|
||||||
wsContainer.setMaxTextMessageSize(65535);
|
wsContainer.setMaxTextMessageSize(65535);
|
||||||
endpoint1 = new JettyWireServerEndpoint(wsContainer, "/");
|
endpoint1 = new JettyWireServerEndpoint(wsContainer, "/ws/text");
|
||||||
endpoint2 = new JettyWireServerEndpoint(wsContainer, "/event");
|
endpoint2 = new JettyWireServerEndpoint(wsContainer, "/ws/bin");
|
||||||
endpoint3 = new JettyWireServerEndpoint(wsContainer, "/other");
|
|
||||||
});
|
});
|
||||||
server.addEventListener(new Listener() {
|
server.addEventListener(new Listener() {
|
||||||
|
|
||||||
|
@ -74,7 +72,6 @@ public class EventServer {
|
||||||
});
|
});
|
||||||
react.fire(No2AllRtsServer.API, new No2AllActServer(endpoint1));
|
react.fire(No2AllRtsServer.API, new No2AllActServer(endpoint1));
|
||||||
react.fire(No2AllRtsServer.API, new No2AllActServer(endpoint2));
|
react.fire(No2AllRtsServer.API, new No2AllActServer(endpoint2));
|
||||||
react.fire(No2AllRtsServer.API, new No2AllActServer(endpoint3));
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,9 +36,9 @@ public final class ZFunRtsConfigJetty implements No2AllReactTypeScript {
|
||||||
private static final Logger logger = Logger.getLogger(ZFunRtsConfigJetty.class.getName());
|
private static final Logger logger = Logger.getLogger(ZFunRtsConfigJetty.class.getName());
|
||||||
private final Server server;
|
private final Server server;
|
||||||
private final ServerConnector connector;
|
private final ServerConnector connector;
|
||||||
private JettyWireServerEndpoint endpoint1;
|
private JettyWireServerEndpoint wsNostr;
|
||||||
private JettyWireServerEndpoint endpoint2;
|
private JettyWireServerEndpoint wsHyper;
|
||||||
private JettyWireServerEndpoint endpoint3;
|
private JettyWireServerEndpoint wsNether;
|
||||||
|
|
||||||
public ZFunRtsConfigJetty(int port) {
|
public ZFunRtsConfigJetty(int port) {
|
||||||
server = new Server();
|
server = new Server();
|
||||||
|
@ -64,12 +64,13 @@ public final class ZFunRtsConfigJetty implements No2AllReactTypeScript {
|
||||||
|
|
||||||
JettyWebSocketServletContainerInitializer.configure(context, (servletContext, wsContainer) -> {
|
JettyWebSocketServletContainerInitializer.configure(context, (servletContext, wsContainer) -> {
|
||||||
wsContainer.setMaxTextMessageSize(65535);
|
wsContainer.setMaxTextMessageSize(65535);
|
||||||
endpoint1 = new JettyWireServerEndpoint(wsContainer, "/con1");
|
wsNostr = new JettyWireServerEndpoint(wsContainer, "/ws/nostr");
|
||||||
endpoint2 = new JettyWireServerEndpoint(wsContainer, "/event");
|
wsHyper = new JettyWireServerEndpoint(wsContainer, "/ws/hyper");
|
||||||
endpoint3 = new JettyWireServerEndpoint(wsContainer, "/other");
|
wsNether = new JettyWireServerEndpoint(wsContainer, "/ws/nether");
|
||||||
});
|
});
|
||||||
|
|
||||||
logger.info("Add H2 console on: /debug/jdbc/console");
|
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("org.h2.server.web.WebServlet", "/debug/jdbc/console/*");
|
||||||
|
|
||||||
context.addServlet(RedirectServlet.class, "/test");
|
context.addServlet(RedirectServlet.class, "/test");
|
||||||
|
@ -87,9 +88,9 @@ public final class ZFunRtsConfigJetty implements No2AllReactTypeScript {
|
||||||
server.addEventListener(new Listener() {
|
server.addEventListener(new Listener() {
|
||||||
@Override
|
@Override
|
||||||
public void lifeCycleStarted(LifeCycle event) {
|
public void lifeCycleStarted(LifeCycle event) {
|
||||||
react.fire(No2AllRtsServer.API, new No2AllActServer(endpoint1));
|
react.fire(No2AllRtsServer.API, new No2AllActServer(wsNostr)); // text
|
||||||
react.fire(No2AllRtsServer.API, new No2AllActServer(endpoint2));
|
react.fire(No2AllRtsServer.API, new No2AllActServer(wsHyper)); // text + bin
|
||||||
react.fire(No2AllRtsServer.API, new No2AllActServer(endpoint3));
|
react.fire(No2AllRtsServer.API, new No2AllActServer(wsNether)); // bin
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in a new issue