This is about Java 'network' library

Hello @jafal,

I did manage to get your code snippet to work integrated with my working example and some adjustments.

I had to add a delay() so that the client data that was sent was buffered and would be available after the connection to receive it.
I also removed client.port() as it is not available in the network library.
It only received data while it was available… 19 elements buffered.

With delay(20000) and sending data every 1 sec there were 20 elements in the buffer to receive and then it exited from the serverEvent() and stop receiving data that continued to be sent by the client.

The hex and ASCII display was a nice touch!

:)

2 Likes