On Thu, Oct 1, 2009 at 4:02 PM, Roger Gilliar <ro...@gilliar.de> wrote:
> Am 01.10.2009 um 21:28 schrieb ngocdaothanh: > > Roger, your code is not event based. > What do you mean by not event based ? He means he wants automatic notification if a connection is dropped. I'm not sure TCP/IP has a native facility for that. What most chat type programs, multiplayer games, and suchlike do is send a periodic ping from server to each connected client, which as part of the chat protocol the client is supposed to acknowledge. If a client stops responding for more than a few ping-intervals, it's assumed to have disconnected or otherwise become unreachable. This method has the advantage of being entirely under the control of the application layer, and the further advantage of also working with UDP (which is crucial in the "multiplayer games" case at least). --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---