public ServerRequest(string host, int port, string url, string session_name, string session_id, string pn_version, string action, progress_callback onprogress, success_callback onsuccess, error_callback onerror) { this.action = action; this.onprogress = onprogress; this.onsuccess = onsuccess; this.onerror = onerror; try { download_request = (HttpWebRequest)WebRequest.Create("http://" + host + ":" + port + url); download_request.Headers.Add("Cookie: " + session_name + "=" + session_id + "; pnversion=" + pn_version); download_request.BeginGetResponse(startReceive, this); } catch (Exception e) { failure("Error connecting to http://" + host, e); return; } }
public ServerRequest(string host, int port, string url, string session_name, string session_id, string pn_version, string action, progress_callback onprogress, success_callback onsuccess, error_callback onerror) { this.action = action; this.onprogress = onprogress; this.onsuccess = onsuccess; this.onerror = onerror; try { download_request = (HttpWebRequest)WebRequest.Create("http://" + host + ":" + port + url); download_request.Headers.Add("Cookie: " + session_name + "=" + session_id + "; pnversion=" + pn_version); download_request.BeginGetResponse(startReceive, this); } catch (Exception e) { failure("Error connecting to http://" + host, e); return; } }