Skip to content

Instantly share code, notes, and snippets.

@pjazdzewski1990
Created May 15, 2015 11:43
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
class CreateGameRequestActor extends Actor {
gameManager ! GameManager.CreateGame
context.setReceiveTimeout(timeout)
override def receive = {
case GameManager.GameCreated(id) =>
ctx.complete(StatusCodes.Created, CreateGameResponseData(id.value))
context stop self
case ReceiveTimeout =>
ctx.complete(StatusCodes.RequestTimeout)
context stop self
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment