Add to docs about HawtDispatch
See what you mean. What we want is to be able to pass in (linked) Actors instead of event handlers here: read_source.setEventHandler(^{ read }) read_source.setCancelHandler(^{ close }) This would require a change in HawtDispatch (if we want to do it cleanly) If you link Session to Server then I guess you could do something like this. Change the catchio fun to this: private def catchio(func: =>Unit):Unit = { try { func } catch { case e:IOException => close case e => server ! Exit(self, e) } } That should restart the Session actor instance. This requires this code to create the Session: val session = actorOf(new Session(self, socket)) self.startLink(session) sessions += session Let me know if it works.
Leave a comment