B4J Question send more data to the client with the same call

Roberto P.

Well-Known Member
Licensed User
Longtime User
I created an app with B4J that exchanges data with the client, with the stream of binary objects (see example:https://www.b4x.com/android/forum/t...device-desktop-and-web-reports.37254/#content)

I need to be able to send data to the server several times, but this is not possible because the stream is closed and does not allow sending data.

How can I manage the stream so that it closes?

Here's an example of code that I want to achieve

B4X:
Sub Handle(req As ServletRequest, resp As ServletResponse)

 for i = 0 to 10
       dim myObject as CMyObject
       myObject.inizialize
     
      myObject.calulate(params...)

       SendObject(myObject, resp.OutputStream)

next

End Sub

in this example, it is sent only the first call.

I hope I was clear.
thank you
 

Roberto P.

Well-Known Member
Licensed User
Longtime User
hello Erel,
thanks for the reply
I know just the web ... socket can also be used without webpages? or to exchange data between the server and the app B4J B4A?

there is an example to exchange data between the two systems?

this would be a good solution, for other needs.

thank you
roberto
 
Upvote 0

Roberto P.

Well-Known Member
Licensed User
Longtime User
I did a test and there are limitations in the size of the parameters.

there is a way to overcome the limits and send via socket size data also some MB?
 
Upvote 0

Roberto P.

Well-Known Member
Licensed User
Longtime User
Hello Erel,
I understand, I see if I can do this combined management. However, we have to open two doors and manage two separate connections.
 
Upvote 0
Top