Fitted the Atmosphere Chat example onto Akka

This commit is contained in:
Viktor Klang 2009-10-12 23:14:56 +02:00
parent 899c86add3
commit 9e88576991
6 changed files with 10 additions and 104 deletions

View file

@ -112,7 +112,13 @@ class Chat extends Actor with Logging {
@Suspend
@GET
@Produces(Array("text/html"))
def suspend = <!-- Comet is a programming technique that enables web servers to send data to the client without having any need for the client to request it. -->
def suspend = {
val s = new StringBuilder
s append "<!-- "
for(i <- 1 to 10) s append "Comet is a programming technique that enables web servers to send data to the client without having any need for the client to request it. "
s append " -->"
s toString
}
override def receive: PartialFunction[Any, Unit] = {
case Chat(who, what, msg) => {