Do you need to closesocket() if the other side has already disconnected or it is unnecessary?
Do you need to closesocket() if the other side has already disconnected or it is unnecessary?
Using Windows 10 with Code Blocks and MingW.
if you do not close the socket, the resource may be leaked. it's a good idea to always close a socket when it is no longer in use.
What can this strange device be?
When I touch it, it gives forth a sound
It's got wires that vibrate and give music
What can this thing be that I found?
You only have to close the client socket after you send and recv your data.
You also want to follow MSDNs preferred method for shutting down communications.
I would close.
Last edited by Salem; 06-19-2014 at 11:04 AM. Reason: Snipped nonsense words and link to marketing site
Thank you!
Using Windows 10 with Code Blocks and MingW.