On 07/03/18 01:11, Konrad “ktoso” Malawski wrote:

The difference is in the binding call you can do, there’s a few styles, yet
each gives back a binding, which contains an address:

val bindingFuture = Http().bindAndHandle(routes, interface =
"", port = 8080)
bindingFuture.foreach { binding ⇒
   println(s"Server online at ${binding.localAddress}")

Ahah, that's what I was looking for, thanks - I wasn't clear how to go from the value returned from bindAndHandle to the bind port - I'd assumed doing something like the above would block on the future. Adding that to the docs would be useful...

On a related note, I found a very helpful code snippet which shows how to provide an Akka-HTTP marshaller to go from/to protobuf in the routing DSL. As protobuf is commonly used with Akka it would be useful if the code in the bug report could be added to the Akka docks as a marshalling example.


Alan Burlison

     Read the docs: http://akka.io/docs/
     Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html
     Search the archives: https://groups.google.com/group/akka-user
--- You received this message because you are subscribed to the Google Groups "Akka User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to