Only just got around to digesting some of the stuff being said here; its been a long couple of days!
So, if a socket could stay open unoticed, do they just keep piling up? Does it cause a system slow down, laggy network traffic, a huge memory overhead or simply sit there doing nothing negative. The reason I ask, I notice MythWeb opens and closes the connection everytime it queries the backend. With the Java stuff I am doing I was wandering whether I could really on my Java backend just maintaining the connection open for the whole time the Java process is running, or should the backend open and close the connection each time? Dave On Thu, 24 Feb 2005 17:44:05 +0100, Holger Buchfink <[EMAIL PROTECTED]> wrote: > David Whyte wrote: > > I have noticed that the proper way to close the socket is to call the > > DONE command over the MythProtocol, but I was wandering what effects > > this would have if it weren't done *everytime* (such as when the > > frontend dies in a nasty way). Do the open connections get 'garbage > > collected' after a certain period of time? > > Depends. There really is no short answer. There's TCP, your client's > kernel (sockets), Qt and Myth. The outcome is dependent on what goes > wrong and when. > > If the client (Myth) dies and it's kernel doesn't, the kernel will > close the socket and all is well. > > If the kernel dies, (or you pull the network cable on the client) > and there is something on the wire, in this case TCP is moving > something, TCP should timeout and close the connection. > > Same as above, the kernel dies etc, but nothing is on the wire and > the server or client don't try to send anything. In this case, > the socket can stay open unnoticed. > > Sockets do provide a keep-alive that lets TCP periodically, default > is 2 hours check the connection, if nothing happens. Qt doesn't implement > this option, probably since it's platform dependent and not reliable. > Myth backend does not currently check the connections, either. Some of > it's connections only send stuff on client request, so I think it is > currently possible that a socket can stay open unnoticed. > > Holger > _______________________________________________ > mythtv-dev mailing list > [email protected] > http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev > -- GMAIL is 'da bomb baby....YEAH I have GMail invites, if you want one, email me direct.
_______________________________________________ mythtv-dev mailing list [email protected] http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
