Elements 3.0 offers built in using the . Websockets are useful in creating high performance bi-directional communication between client and server code. Generally speaking, Websockets are considerably faster than HTTP requests for authoritative code and work well with practically all clients including Web, Unity3d, Unreal, .NET and many other connected services.
Steps to Defining a Websocket Element
To use the Jakarta RS in your own Element, you must perform the following steps:
by annotating the package-info type in your code.
Add all compiled classes and jars into the .
Annotate each Websocket endpoint with the annotation.
Complete Example
The following example walks through the necessary files to define a simple Websocket echo server.