Newbie question here.. Just trying to be sure here..
This is not a HTTP Keep-Alive question.
Is there a way to make sure a socket gets closed() after a certain amount of time.
Why i’m asking this because if I just close socket right away.. the client may not receive the packet to indicate like incorrect password etc..
Is there any timeout like built in command inside Socket?
I’m trying to avoid building a timer or event to close it off thinking of a alternate solution
I never tried it myself, but there is
LingerOption.Take a look at Socket.LingerState Property.