Skip to content

Instantly share code, notes, and snippets.

@sprsquish
Created May 6, 2014 16:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sprsquish/5ab2b8d07f4fa4cff06d to your computer and use it in GitHub Desktop.
Save sprsquish/5ab2b8d07f4fa4cff06d to your computer and use it in GitHub Desktop.
val closeFuture = new Promise[Unit]
val c = new ClientConnection {
def remoteAddress: SocketAddress = null
def localAddress: SocketAddress = null
def onClose: Future[Unit] = closeFuture
def close(deadline: Time): Future[Unit] = {
closeFuture.setDone()
closeFuture
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment