C# Class apophis.SharpIRC.StarkSoftProxy.ProxyClientFactory

Factory class for creating new proxy client objects.
// create an instance of the client proxy factory ProxyClientFactory factory = new ProxyClientFactory(); // use the proxy client factory to generically specify the type of proxy to create // the proxy factory method CreateProxyClient returns an IProxyClient object IProxyClient proxy = factory.CreateProxyClient(ProxyType.Http, "localhost", 6588); // create a connection through the proxy to www.starksoft.com over port 80 System.Net.Sockets.TcpClient tcpClient = proxy.CreateConnection("www.starksoft.com", 80);
ファイルを表示 Open project: FreeApophis/sharpIRC Class Usage Examples

Public Methods

Method Description
CreateProxyClient ( ProxyType type ) : IProxyClient

Factory method for creating new proxy client objects.

CreateProxyClient ( ProxyType type, TcpClient tcpClient ) : IProxyClient

Factory method for creating new proxy client objects using an existing TcpClient connection object.

CreateProxyClient ( ProxyType type, TcpClient tcpClient, string proxyHost, int proxyPort, string proxyUsername, string proxyPassword ) : IProxyClient

Factory method for creating new proxy client objects.

CreateProxyClient ( ProxyType type, string proxyHost, int proxyPort ) : IProxyClient

Factory method for creating new proxy client objects.

CreateProxyClient ( ProxyType type, string proxyHost, int proxyPort, string proxyUsername, string proxyPassword ) : IProxyClient

Factory method for creating new proxy client objects.

Method Details

CreateProxyClient() public method

Factory method for creating new proxy client objects.
public CreateProxyClient ( ProxyType type ) : IProxyClient
type ProxyType The type of proxy client to create.
return IProxyClient

CreateProxyClient() public method

Factory method for creating new proxy client objects using an existing TcpClient connection object.
public CreateProxyClient ( ProxyType type, TcpClient tcpClient ) : IProxyClient
type ProxyType The type of proxy client to create.
tcpClient System.Net.Sockets.TcpClient Open TcpClient object.
return IProxyClient

CreateProxyClient() public method

Factory method for creating new proxy client objects.
public CreateProxyClient ( ProxyType type, TcpClient tcpClient, string proxyHost, int proxyPort, string proxyUsername, string proxyPassword ) : IProxyClient
type ProxyType The type of proxy client to create.
tcpClient System.Net.Sockets.TcpClient Open TcpClient object.
proxyHost string The proxy host or IP address.
proxyPort int The proxy port number.
proxyUsername string The proxy username. This parameter is only used by Socks4 and Socks5 proxy objects.
proxyPassword string The proxy user password. This parameter is only used Socks5 proxy objects.
return IProxyClient

CreateProxyClient() public method

Factory method for creating new proxy client objects.
public CreateProxyClient ( ProxyType type, string proxyHost, int proxyPort ) : IProxyClient
type ProxyType The type of proxy client to create.
proxyHost string The proxy host or IP address.
proxyPort int The proxy port number.
return IProxyClient

CreateProxyClient() public method

Factory method for creating new proxy client objects.
public CreateProxyClient ( ProxyType type, string proxyHost, int proxyPort, string proxyUsername, string proxyPassword ) : IProxyClient
type ProxyType The type of proxy client to create.
proxyHost string The proxy host or IP address.
proxyPort int The proxy port number.
proxyUsername string The proxy username. This parameter is only used by Socks4 and Socks5 proxy objects.
proxyPassword string The proxy user password. This parameter is only used Socks5 proxy objects.
return IProxyClient