Thanks Erel and DonManfred!
I moved everything about asyncstreams to a Service module. But I still have problems to get the information I want to send correctly sent to the other side.
In the main module eg. I write:
mcode=15
Dim request As Object= mcode & s 'two variables, s="|"
Dim jo As JavaObject =request
CallSub2(StreamService,"send",jo)
This gives java errors. I tried several other formats; some really send information, but the receiving side then get the text "String 15|"
The service module has the code:
Public Sub Send (Mess As String)
If Stream1.IsInitialized = False Then Stream1.Initialize(Me,"Stream1",Client1.InputStream,Client1.OutputStream) 'to Raspberry
Stream1.Write(Mess&CRLF)
End Sub
Could somebody correct these small pieces of code! Please.
Harry