indyscala/akka-io-demo — pull request #1 by bfritz (2013-11-05 05:02:30+00:00)
Title: flush and close after writing time to socket

Seems like a reasonable way to close the time server connection per:
http://doc.akka.io/docs/akka/2.2.3/scala/io-tcp.html#closing-connections

Matches, at least roughly, the way xinetd does it:
https://github.com/xinetd-org/xinetd/blob/xinetd-2-3-15/xinetd/builtins.c#L347-L350

Also possible to wait for the OS to ack the socket write:
https://github.com/bfritz/akka-io-demo/tree/timeserver-close-after-ack