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

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

Detailed Description

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

Constructor & Destructor Documentation

◆ SocksProxy() [1/4]

ASPOSE_EMAIL_SHARED_API 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_SHARED_API 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_SHARED_API 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_SHARED_API 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

Member Function Documentation

◆ get_SupportedAuthenticationMethods()

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

The supported authentication methods to connect to SOCKS server

◆ get_Version()

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

Required SOCKS server version.

◆ set_SupportedAuthenticationMethods()

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

The supported authentication methods to connect to SOCKS server

◆ set_Version()

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

Required SOCKS server version.

◆ SetUpStream()

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

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.