Transmitter5SetHttpProxy Method |
Set the address and port number of the open HTTP proxy to be used to reach the Internet
Namespace: SwissDecTXAssembly: SwissDecTX.Transmitter5 (in SwissDecTX.Transmitter5.dll) Version: 5.0.0.0 (5.0.0.0)
Syntaxpublic void SetHttpProxy(
string host,
int port
)
Public Sub SetHttpProxy (
host As String,
port As Integer
)
public:
virtual void SetHttpProxy(
String^ host,
int port
) sealed
function SetHttpProxy(host, port);
Parameters
- host String
- IP address or name of the HTTP proxy server
- port Int32
- Port number, e.g. 8080
RemarksCalling this method is normally not needed. SwissDecTX supports automatic detection and execution of proxy configuration scripts. This feature is also known as Web Proxy Auto-Discovery (WPAD). When using automatic proxy configuration, a configuration script, typically named Wpad.dat, must be located, downloaded, compiled, and run. If these operations are successful, the script returns the proxies that can be used for a request. If the proxy requires authentication, it will be presented with the default credentials from the currently logged-on user. If you need to pass different credentials, please see
SetHttpProxyWithCredentials(String, Int32, String, String)
ExampleCalling Transmitter.SetHttpProxy()
using SwissDecTX;
try {
var tx = new Transmitter5();
tx.SetHttpProxy("webproxy", 8080);
} catch (Exception ex) {
MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
See Also