Closed Socket is still running!

BlitzMax Forums/BlitzMax Programming/Closed Socket is still running!

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

No see I left it out because it doesn't work as expected. It will return true that the socket is still connected even if the socket really has been closed but there is still data left to be read or written in its buffer. The only way to make sure the socket is closed is to read or write and have it fail:
' a write that will close client on failure

Try
	WriteInt(client, 100)
Catch e:TStreamWriteException
	CloseClient(client)
EndTry

' a read that will close client on failure

Try
	i = ReadInt(client)
Catch e:TStreamReadException
	CloseClient(client)
EndTry

Also I'm glad that someone has used my module because I think it makes writing network code easier and cleaner.