I have the following piece of code which is called once every minute or so (inside a timer event):
This sends the contents of "SendString" (which is only about 80 bytes in size) to the server at "RemoteHostIP:RemoteHostPort" just fine. However, client.Close doesn't actually close the connection.
So if I run the program for about 10 minutes, it will have opened 10 connections which are only closed when I actually exit the program.
Why?
B4X:
client.New1
client.Connect( RemoteHostIP, RemoteHostPort )
BinaryFile.New1( client.GetStream, True )
BinaryFile.WriteString( SendString )
client.Close
This sends the contents of "SendString" (which is only about 80 bytes in size) to the server at "RemoteHostIP:RemoteHostPort" just fine. However, client.Close doesn't actually close the connection.
So if I run the program for about 10 minutes, it will have opened 10 connections which are only closed when I actually exit the program.
Why?