Hi all, I have a real curly one and very new to b4j.
I have a server app, it listens, accepts a request into a client class using the code below
Main
private Sub Server_NewConnection (Successful As Boolean, NewSocket As Socket)
If Not(Successful) Then Return
Dim connection As Client
connection.Initialize(NewSocket)
Client code
Public Sub Initialize(socket As Socket)
gsocket = socket
AStreams.Initialize(gsocket.InputStream, gsocket.OutputStream, "AStreams")
THis work great, I connect, exchange data blh blah and disconnect. The client is detroyed BUT gsocket will not get destroyed and any subsequent connections come back to this same socket as far as I can tyell, nocevent triggered in Main to create a new instance of the client etc.
How do I destroy gsocket and force the server part to create a whole new instance. I have read stuff on severinpl etc and know there are things that can be set ;ike solinger false with timeout=0 byt U cannot access them.