The Akka HTTP documentation [1] says:
"The Http.ServerBinding also provides a way to get a hold of the actual
local address of the bound socket, which is useful for example when
binding to port zero (and thus letting the OS pick an available port)."
The scenario is I'm using a localhost http service which needs to be on
a system-assigned localhost port to communicate with subprocesses and I
need to find out which port the server is bound to. Despite what the
documentation says I can find no way of doing this before starting to
accept incoming connections, and no way of doing it using the high-level
routing DSL.
[1]
https://doc.akka.io/docs/akka-http/current/server-side/low-level-api.html#starting-and-stopping
--
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.