Zlgo Member Nov 12, 2019 #1 Found problem with using ServerSocket example where two identical "client-server" application on two separate PC breaks communication if speed of sending data is faster. Rule is that on remote side server close connection by himself, but on client side this is not detected by event just (debug mode) trow: java.net.SocketException: socket closed at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.socketRead(SocketInputStream.java:116) at java.net.SocketInputStream.read(SocketInputStream.java:171) at java.net.SocketInputStream.read(SocketInputStream.java:141) at java.net.SocketInputStream.read(SocketInputStream.java:127) at anywheresoftware.b4a.randomaccessfile.AsyncStreams$AIN.run(AsyncStreams.java:199) at java.lang.Thread.run(Thread.java:748) java.net.SocketException: Socket closed at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:118) at java.net.SocketOutputStream.write(SocketOutputStream.java:143) at anywheresoftware.b4a.randomaccessfile.AsyncStreams$AOUT.run(AsyncStreams.java:338) at java.lang.Thread.run(Thread.java:748) Attachments SoketPrimjer.zip SoketPrimjer.zip 415.9 KB · Views: 435
Found problem with using ServerSocket example where two identical "client-server" application on two separate PC breaks communication if speed of sending data is faster. Rule is that on remote side server close connection by himself, but on client side this is not detected by event just (debug mode) trow: java.net.SocketException: socket closed at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.socketRead(SocketInputStream.java:116) at java.net.SocketInputStream.read(SocketInputStream.java:171) at java.net.SocketInputStream.read(SocketInputStream.java:141) at java.net.SocketInputStream.read(SocketInputStream.java:127) at anywheresoftware.b4a.randomaccessfile.AsyncStreams$AIN.run(AsyncStreams.java:199) at java.lang.Thread.run(Thread.java:748) java.net.SocketException: Socket closed at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:118) at java.net.SocketOutputStream.write(SocketOutputStream.java:143) at anywheresoftware.b4a.randomaccessfile.AsyncStreams$AOUT.run(AsyncStreams.java:338) at java.lang.Thread.run(Thread.java:748)
Erel B4X founder Staff member Licensed User Longtime User Nov 12, 2019 #2 Please use File - Export as zip when uploading projects. I don't understand your code. Why are you making a new connection each time? Start with this example: https://www.b4x.com/android/forum/threads/b4x-network-asyncstreams-b4xserializator.72149/#content Upvote 0
Please use File - Export as zip when uploading projects. I don't understand your code. Why are you making a new connection each time? Start with this example: https://www.b4x.com/android/forum/threads/b4x-network-asyncstreams-b4xserializator.72149/#content