B4J Question [BANanoServer] [SOLVED] How to implement Cloud IoT Strategy based on Erel's Networking TCP/IP Learning Video?


Licensed User
Longtime User


As a newbie to BANanoServer...

I was just watching Erel's Networking TCP/IP Video tutorial and we are able to reproduce this with B4J for an Cloud IoT Device.


1. We receive a callback output from a Cloud IoT service at specific intervals. This is a one way event with data towards us.
2. We receive the callback output and are able to process it with B4J using similar code below.
3. On the cloud side we are not running any B4J app to speak to our B4J server, we just indicated the IP address of our B4J server and the port and then the payload structure we want.
4. When the data is received, we process it on Astream_NewData event.
5. We have implemented similar code as this below from Erels learning video.


Q1. With the BANanoServer, how do we implement such code. Do we put it on a similar code module like SHAREDHuman?

I understand that perhaps one needs to enclose the code with

#if B4J
#End if

Is that correct?

Q2. We need to write this to a backend database. With ABM, the ABMFeedback example uses jSQL, has a nice DBM class, so one could follow the same approach with BANanoServer for backend access?

Q3. As these are cloud based IoT services (i.e. one way /we don't initiate the client side), how does one force close the connection after processing the data as we are not running B4J in it? for example astream.close?

I thank you.

Last edited:


Licensed User
Longtime User
Is there an alternative way within the BANanoServer name's pace that one can listen for incoming connections and process the payload?

Remember like I said, our b4j server implentation of this works well on port 55056, we just want to port the code to BANanoServer.

This off course will have to work get compiled and run using the jServer using

#if bj
#end if

If possible as it won't be Banano code but specific for the jServer jar file.

Upvote 0