Closed trevj closed 10 years ago
@Paul-E - you're the one who has looked at firefox's socket stuff. Changes we should be making to this interface at this point to support that?
Anyway, we have this in the socket API as well, so it shouldn't be a problem :+1:
Great. Thanks Will. Yeah, in this case I didn't see any need to stray from the standard socket API.
So, when you call bind with port zero the system will choose a free port for you. Turns out that's pretty handy for some stuff I'm working on. This surfaces the getInfo call, with which you can query the bound port (and address).
Open to suggestions on whether it's better to have separate getPort() and getAddress() calls vs. this catch-all getInfo().