protected UpnpServer(Uri url) { listener = new HttpListener { IgnoreWriteExceptions = true }; listener.Prefixes.Add (url.ToString ()); }
void StartListening() { if (listener == null) { listener = new http.HttpListener { IgnoreWriteExceptions = true }; listener.Prefixes.Add (prefix); } lock (listener) { listener.Start (); listener.BeginGetContext (OnGotContext, null); } }