You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When asking Iron to listen on localhost:0, the kernel assigns an unused port number, and getaddrinfo resolves localhost to 127.0.0.1. The actual address can be displayed via format!("{}", listening.socket) where listening is an instance of the type returned by Iron::http and friends.
Example output from racerd
The first line is my own logging, and the second line is from this crate.
racerd listening at 127.0.0.1:54663
GET http://localhost:0/ping -> 200 OK (0.086167 ms)
Discussion
I'm not familiar with all members of the Request type, but it seems that Iron would need to pass in either the address or a reference to the listening server in order to access this information.
The text was updated successfully, but these errors were encountered:
When asking Iron to listen on
localhost:0
, the kernel assigns an unused port number, and getaddrinfo resolves localhost to127.0.0.1
. The actual address can be displayed viaformat!("{}", listening.socket)
wherelistening
is an instance of the type returned byIron::http
and friends.Example output from racerd
The first line is my own logging, and the second line is from this crate.
Discussion
I'm not familiar with all members of the
Request
type, but it seems that Iron would need to pass in either the address or a reference to the listening server in order to access this information.The text was updated successfully, but these errors were encountered: