Send/ReceiveNetworkData(), ConnectionID()... crash prevention
Posted: Fri Mar 28, 2025 4:24 pm
Hi,
I'm curious about the behaviour of those network functions when the connection parameter is not valid anymore.
I'm working on a TCP client/server (=~ 250 simultaneous connected clients) and if a client disconnects when a working thread try to send data to it, crash happens. I have to check everytime the accessibility of the socket with a non PB native function.
If I compare with the win32 send_() function, this last one doesn't crash if the socket handle is obsolete.
Is there a technical reason why those functions crash with a "invalid memory access" ?
Could you enhance those functions so that they will accept an obsolete socket handle and return an new error value ?
Thanks for your time.
I'm curious about the behaviour of those network functions when the connection parameter is not valid anymore.
I'm working on a TCP client/server (=~ 250 simultaneous connected clients) and if a client disconnects when a working thread try to send data to it, crash happens. I have to check everytime the accessibility of the socket with a non PB native function.
If I compare with the win32 send_() function, this last one doesn't crash if the socket handle is obsolete.
Is there a technical reason why those functions crash with a "invalid memory access" ?
Could you enhance those functions so that they will accept an obsolete socket handle and return an new error value ?
Thanks for your time.