Skip to content

Instantly share code, notes, and snippets.

@longcao longcao/Server.scala
Created Dec 20, 2013

Embed
What would you like to do?
Server source code.
import akka.actor._
object Server extends App {
val system = ActorSystem("serverSystem")
val serverActor = system.actorOf(Props(new ServerActor), name = "ServerActor")
}
class ServerActor extends Actor {
def receive = {
case message: String =>
println("Internal monologue: What? Someone said hello. Nobody taught me any social skills in this basement. I should say hi back.")
sender ! "Hi."
case _ => println("I got something I didn't understand.")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.