If you are experiencing an issue please mention the full platform your issue applies to:
IDE: NetBeans/Eclipse/IDEA
Desktop OS
Simulator
Device
Our client needs to maintain a socket connection to the server. (Plain socket, not web socket)
Then I found the doc:
https://www.codenameone.com/javadoc/com/codename1/io/Socket.html
I see there is only `listen()` without `read()` and `send()`
Our use cases are simple, client sends some `commands` to the server, and the response, and render them on the UI.
Where could I find an example to implement this `read()` and `send()` method?
Or at least some hints.
I checked the developer guide `11.13. Sockets` too.
Looks like I need to implement a `SocketListenerCallback` class,
and doing `send()` and `read()` in the `connectionEstablished(InputStream is, OutputStream os)`, right?
but that's one function, how to implement the `send()` and `read()` via that, or is there a better way?
And it should be cross-platformable, right?
Thanks