Possible Duplicate:
Should I close a socket (TCPIP) after every transaction?
Lets say I have some type of interprocess communication that works using sockets.
Should my processes establish a connection and hold it open (1 thread per client or similar) sending data when it needs; or is a better approach to simply establish a connection, send the data I wish, close it and enter my wait state again?
What is usually the approach to this problem?
I asked this same question and all three responses said to leave it open. I went with that, and it seems to be working for me.
Should I close a socket (TCPIP) after every transaction?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With