I'm making a long-running request with an HttpWebRequest asynchronously. While the request is running, I'd like to be able to get the local port of the request (ie, the one on the client, not the server). How do I do that?
I've looked at HttpWebRequest.ServicePoint.BindIPEndPointDelegate, but that just seems to allow the caller to specify the local addy/port. Ideally, I'd like to allow HttpWebRequest to pick its local port normally and then ask it what it chose.