Aspose::Email::Clients::SocksProxy Class Reference

SOCKS proxy client. Supported versions of the protocol are SOCKS4 and SOCKS5. More...

Inherits Aspose::Email::Clients::Proxy.

Public Member Functions

SocksVersion get_Version () const
 Required SOCKS server version. More...
 
void set_Version (SocksVersion value)
 Required SOCKS server version. More...
 
SocksAuthenticationMethods get_SupportedAuthenticationMethods () const
 The supported authentication methods to connect to SOCKS server More...
 
void set_SupportedAuthenticationMethods (SocksAuthenticationMethods value)
 The supported authentication methods to connect to SOCKS server More...
 
 SocksProxy (System::String address, int32_t port)
 Initializes a new instance of the SocksProxy class to connect to SOCKS4 server without authentication. More...
 
 SocksProxy (System::String address, int32_t port, SocksVersion version)
 Initializes a new instance of the SocksProxy class to connect to SOCKS4 or SOCKS5 server without authentication. More...
 
 SocksProxy (System::String address, int32_t port, System::String userID)
 Initializes a new instance of the SocksProxy class to connect to SOCKS4 server without authentication. More...
 
 SocksProxy (System::String address, int32_t port, System::String username, System::String password)
 Initializes a new instance of the SocksProxy class to connect to SOCKS5 server with defined username and password. More...
 
void SetUpStream (System::SharedPtr< System::IO::Stream > stream, System::String address, int32_t port) override
 Configures proxy-server to transport data to the target host. More...
 
- Public Member Functions inherited from Aspose::Email::Clients::Proxy
System::String get_Address () const
 The domain name or IP address of the proxy server More...
 
void set_Address (System::String value)
 The domain name or IP address of the proxy server More...
 
int32_t get_Port () const
 The port number for the proxy server More...
 
void set_Port (int32_t value)
 The port number for the proxy server More...
 
System::String get_Username () const
 Username for proxy authentication More...
 
void set_Username (System::String value)
 Username for proxy authentication More...
 
System::String get_Password () const
 Password for proxy authentication More...
 
void set_Password (System::String value)
 Password for proxy authentication More...
 
 Proxy (System::String address, int32_t port, System::String username, System::String password)
 
System::SharedPtr< System::IO::Stream > GetStream (System::String address, int32_t port)
 Returns configured network stream to transport data to the required host through the proxy server. More...
 
void Dispose () override
 Disposes this instance and requests that the underlying TCP connection be closed. More...
 

Protected Member Functions

virtual ~SocksProxy ()
 

Detailed Description

SOCKS proxy client. Supported versions of the protocol are SOCKS4 and SOCKS5.

Constructor & Destructor Documentation

◆ SocksProxy() [1/4]

Aspose::Email::Clients::SocksProxy::SocksProxy ( System::String  address,
int32_t  port 
)

Initializes a new instance of the SocksProxy class to connect to SOCKS4 server without authentication.

Parameters
addressThe domain name or IP address of the proxy
portThe port number of the proxy

◆ SocksProxy() [2/4]

Aspose::Email::Clients::SocksProxy::SocksProxy ( System::String  address,
int32_t  port,
SocksVersion  version 
)

Initializes a new instance of the SocksProxy class to connect to SOCKS4 or SOCKS5 server without authentication.

Parameters
addressThe domain name or IP address of the proxy
portThe port number of the proxy
versionRequired SOCKS server version.

◆ SocksProxy() [3/4]

Aspose::Email::Clients::SocksProxy::SocksProxy ( System::String  address,
int32_t  port,
System::String  userID 
)

Initializes a new instance of the SocksProxy class to connect to SOCKS4 server without authentication.

Parameters
addressThe domain name or IP address of the proxy
portThe port number of the proxy
userIDUserID for Socks4 Identification Protocol (RFC 1413)

◆ SocksProxy() [4/4]

Aspose::Email::Clients::SocksProxy::SocksProxy ( System::String  address,
int32_t  port,
System::String  username,
System::String  password 
)

Initializes a new instance of the SocksProxy class to connect to SOCKS5 server with defined username and password.

Parameters
addressThe domain name or IP address of the proxy
portThe port number of the proxy
usernameUsername for authentication
passwordPassword for authentication

◆ ~SocksProxy()

virtual Aspose::Email::Clients::SocksProxy::~SocksProxy ( )
protectedvirtual

Member Function Documentation

◆ get_SupportedAuthenticationMethods()

SocksAuthenticationMethods Aspose::Email::Clients::SocksProxy::get_SupportedAuthenticationMethods ( ) const

The supported authentication methods to connect to SOCKS server

◆ get_Version()

SocksVersion Aspose::Email::Clients::SocksProxy::get_Version ( ) const

Required SOCKS server version.

◆ set_SupportedAuthenticationMethods()

void Aspose::Email::Clients::SocksProxy::set_SupportedAuthenticationMethods ( SocksAuthenticationMethods  value)

The supported authentication methods to connect to SOCKS server

◆ set_Version()

void Aspose::Email::Clients::SocksProxy::set_Version ( SocksVersion  value)

Required SOCKS server version.

◆ SetUpStream()

void Aspose::Email::Clients::SocksProxy::SetUpStream ( System::SharedPtr< System::IO::Stream >  stream,
System::String  address,
int32_t  port 
)
overridevirtual

Configures proxy-server to transport data to the target host.

Parameters
streamStream which is connected to the proxy-server.
addressThe network address of the target host we want to contact
portThe port number of the target host we want to contact

Implements Aspose::Email::Clients::Proxy.