[buug] should a socket be short lived?
John de la Garza
john at jjdev.com
Fri Sep 12 18:00:51 PDT 2008
I'm writing a program that needs to talk to another process using a
tcp socket. I've been told to create the socket at the time the
program starts then leave it up the whole life of the program.
I am wondering if in general people create sockets use them then
close them or leave them open for reuse.
It seems like it is easier to open it ask for the data get the data
then have the server close it. I know where the data ends and don't
have to build a packet with a header then parse and buffer it.
More information about the buug