This page lists the sample distributed with Jnag.
Echo-jse-embedded
The simplest sample. It is composed of 2 parts, a client and a server, running within the same thread. The server is simulated in the way that the transfer of the binary data between the client and the server is done via a function call instead of via a socket. This is to keep the sample easy to read, trace, and understand.
The sample displays a UI where the user can send some messages from the client to the server:
Those messages are function calls defined by the user of the library in the project "Network Model".
- From the client to the server, the function is:
public interface EchoServer {
void requestSaySomething(String message);
}- From the server to the client, the function is:
public interface EchoClient {
void notifyEchoSaidSomething(String message);
}
In this simple sample, the server answer immediately to the client once it receives the message.
Echo-jse-rds
This sample is functionally doing the same things than the echo-jse-embedded. The difference is that it is really running separate programs for the client and the server, and it is using the Red Dwarf server to show a real life use case demonstration.
More information on how to compile and run Red Dwarf samples.





