Wish jWebSocketClientV2

OliverA

Expert
Licensed User
Longtime User
I wish for a jWebSocketClient library (that can have a different name, so as to keep the jWebSocketClient library that's based on Jetty3) that is based on the latest Jetty revision that is included in the latest B4J. This may resolve the Web Socket connect issues found on this forum when it comes to using the Jetty 3 based jWebSocketClient library against the Jetty 4 Server included in the latest B4J.
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
jWebSocketClient v2.00 is attached. It requires Java 11+.
It solves the wss connection issue. It wasn't fully tested so consider it a beta version.

The instructions are a bit more complicated than usual:
1. jWebSocketClient.xml + jar go into the internal libraries folder.
2. The other two jars from the second zip go into internal libraries folder\jserver

Add this in order to build a standalone package:
B4X:
#AdditionalJar: jserver/jetty-webapp-11.0.9.jar
#PackagerProperty: AdditionalModuleInfoString = provides org.slf4j.spi.SLF4JServiceProvider with org.eclipse.jetty.logging.JettyLoggingServiceProvider;
#PackagerProperty: IncludedModules = jdk.charsets, jdk.crypto.ec
 

Attachments

  • internal libs folder.zip
    6.2 KB · Views: 115
  • jserver folder.zip
    402.8 KB · Views: 98
Last edited:

Chris2

Active Member
Licensed User
jWebSocketClient v2.00 is attached. It requires Java 11+.
It solves the wss connection issue. It wasn't fully tested so consider it a beta version.

The instructions are a bit more complicated than usual:
1. jWebSocketClient.xml + jar go into the internal libraries folder.
2. The other two jars from the second zip go into internal libraries folder\jserver
When trying to compile with the new version, I get:
B4X:
Cannot find: C:\Program Files\Anywhere Software\B4J\libraries\jserver/websocket-jetty-client-11.0.9.jar

The jserverfolder.zip contains jetty-client-11.0.9.jar & websocket-core-client-11.0.9.jar. Should I already have websocket-jetty-client-11.0.9.jar?
(I tried renaming jetty-client-11.0.9.jar to websocket-jetty-client-11.0.9.jar, but then the compiler complains of a missing jetty-client-11.0.9.jar)
 
Top