B4J Question Reason of socket reset.

HARRY

Active Member
Licensed User
Longtime User
I have posted this question in the wrong section; it is a B4J question. Please move it to that section.

Hi,

I have a strange problem using asyncstreams.

My program is a server program running on a raspberry, newest version . It accepts messages arriving from sensors with some intervals via the USB port using asyncsteamtext.

It runs for some time accepting messages and the suddenly it stops with the following error information:

java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:189)
at java.net.SocketInputStream.read(SocketInputStream.java:121)
at java.net.SocketInputStream.read(SocketInputStream.java:107)
at anywheresoftware.b4a.randomaccessfile.AsyncStreams$AIN.run(AsyncStreams.java:184)
at java.lang.Thread.run(Thread.java:744)
error: (SocketException) java.net.SocketException: Connection reset

Sometimes it runs only for some minutes, sometimes it runs for an hour.

The program is also listening to two other streams, a second asyncstreamtext and one asyncstreamobject, but on these streams nothing happens. This error occurs both in debug mode and in release mode.

What can be the reason for this error and how can I get more information on the reason?

Harry
 
Last edited:

stefanogoria

Member
Licensed User
Longtime User
Hi Erel, anyu other suggestions about java.net.SocketException: Connection reset
I am try to translate in B4J a TCP server application working fine in B4A and with this error in B4J
Which is te real problem ? there is a way to resolve ?
Thanks a lot for your precious help
Stefano
 
Upvote 0

stefanogoria

Member
Licensed User
Longtime User
Thanks Erel, yes I know, I would like only understand how could appen.
I use the same hardware (RPI 2 - RPI 3) for the server powerd by linux - java or Androind
and I use same hardware for client devices (some esp8266 wifi devices and various android devices)
In case the server is running with android and B4A application all is working fine, in the other case (B4J jar running on linux) I have this error.
Thanks a lot again for all
Stefano
 
Upvote 0
Top