Ola
SOLUTION AND DISCUSSION
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.
Scenario:
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
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.
TheMash
SOLUTION AND DISCUSSION
[BANanoServer] [SOLVED] How can I listen for HTTP Payload data?
Ola I'm expecting HTTP payload data, I'd like to listen for connections on my running BANanoServer Port and then process the payload data. The source is not a b4x server and I don't have control over it. Thanks
www.b4x.com
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.
Scenario:
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
B4X:
#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.
TheMash
Last edited: