ProxySocket Class
Namespace: Rebex.Net
Assembly: Rebex.Networking.dll (version 7.0.9147)
Implements the subset of the Berkeley sockets interface; adds the ability to connect through SOCKS4/SOCKS5 and HTTP proxies.
Syntax
public class ProxySocket : ISocketExt, ISocket, IDisposable
Inherited Members
Remarks
This class is suitable for extending your client applications with the ability to connect through proxies.
This class is limited to operations supported by proxies - it is not a replacement for the Socket. This means it is perfect for writing clients, but useless for writing servers.
Only connection-oriented protocols are supported at the moment
Constructors
Name | Description |
---|---|
Proxy |
Initializes an empty instance of the Proxy |
Proxy |
Initializes a new instance of Proxy |
Proxy |
Initializes a new instance of the Proxy |
Properties
Name | Description |
---|---|
Authentication |
Gets the authentication method to use for HTTP CONNECT proxy. NTLM authentication is only supported by some HTTP CONNECT proxies. |
Available | Gets the amount of data that has been received from the network and is available to be read. |
Connected | Gets a value that indicates whether the Proxy |
Domain | Gets the domain to submit to the proxy server for authentication. |
Handle | Gets the operating system handle for the inner Socket. |
Information | Gets socket information on the underlying socket object. |
Local |
Gets the local endpoint. |
Local |
Gets the local TCP port range to which to bind the connections. |
Password | Gets the username to submit to the proxy server for authentication. Password authentication is not supported by SOCKS4 and SOCKS4a. |
Proxy |
Gets the hostname of the proxy server. |
Proxy |
Gets the port of the proxy server. |
Proxy |
Gets the type of the proxy server. |
Receive |
Gets or sets receive buffer size. Must be set before calling the Connect(String, Int32) method. |
Remote |
Gets the remote endpoint. |
Send |
Gets or sets send buffer size. Must be set before calling the Connect(String, Int32) method. |
Socket | Gets the internal Socket value. |
Timeout | Gets or sets the length of time in milliseconds before the operation times out (specify -1 or 0 to indicate that the request does not time out which is default). |
User |
Gets the username to submit to the proxy server for authentication. |
Methods
Name | Description |
---|---|
Accept() | Accepts an incoming connection. |
Begin |
Begins an asynchronous request to accept an incoming connection. |
Begin |
Begins an asynchronous request for a connection to a network device. |
Begin |
Begins an asynchronous request for a connection to a network device. |
Begin |
Starts an asynchronously request to listen for an incoming connection using the specified control socket as a base. |
Begin |
Begins to asynchronously receive data from a connected Proxy |
Begin |
Sends data asynchronously to a connected Proxy |
Bind(Socket) | Binds this Proxy |
Close() | Forces the Proxy |
Connect(End |
Establishes a connection to a remote device. |
Connect(String, Int32) | Establishes a connection to a remote device. |
Dispose() | Disposes the object. |
End |
Ends an asynchronous request to accept an incoming connection. |
End |
Ends a pending asynchronous connection request. |
End |
Ends an asynchronous request to listen for an incoming connection. |
End |
Ends a pending asynchronous read. |
End |
Ends a pending asynchronous send. |
Get |
Gets a value that indicates whether the Proxy |
Is |
Checks whether the host address is a valid hostname or IP address. |
Listen(ISocket) | Starts a request to listen for an incoming connection using the specified control socket as a base. |
Poll(Int32, Socket |
Determines the status of the socket. |
Receive(Byte[]) | Receives data from a connected Proxy |
Receive(Byte[], Int32, Int32) | Receives the specified amount of data from a connected Proxy |
Receive(Byte[], Int32, Int32, Socket |
Receives the specified amount of data from a connected Proxy |
Receive(Byte[], Int32, Socket |
Receives the specified amount of data from a connected Proxy |
Receive(Byte[], Socket |
Receives data from a connected Proxy |
Send(Byte[]) | Sends data to a connected Proxy |
Send(Byte[], Int32, Int32) | Sends the specified amount of data to a connected Proxy |
Send(Byte[], Int32, Int32, Socket |
Sends the specified amount of data to a connected Proxy |
Send(Byte[], Int32, Socket |
Sends the specified amount of data to a connected Proxy |
Send(Byte[], Socket |
Sends data to a connected Proxy |
Shutdown(Socket |
Disables sends and receives on the Proxy |
To |
Chooses the most appropriate IP endpoint to use from the host entry. |
To |
Converts the host address and port into an IP endpoint. If the host address is not an IP address, returns null. |