DotMSN |

# ProxySocket Constructor (AddressFamily, SocketType, ProtocolType, String)

Initializes a new instance of the ProxySocket class.

[Visual Basic]
Overloads Public Sub New( _
ByVal addressFamily As AddressFamily, _
ByVal socketType As SocketType, _
ByVal protocolType As ProtocolType, _
ByVal proxyUsername As String _
)
[C#]
public ProxySocket(
AddressFamily addressFamily,
SocketType socketType,
ProtocolType protocolType,
string proxyUsername
);

#### Parameters

addressFamily
  One of the AddressFamily values.
socketType
  One of the SocketType values.
protocolType
  One of the ProtocolType values.
proxyUsername
  The username to use when authenticating with the proxy server.

#### Exceptions

Exception Type | Condition
--- | ---
SocketException | The combination of addressFamily, socketType, and protocolType results in an invalid socket.
ArgumentNullException | `proxyUsername` is null.

#### See Also

ProxySocket Class | Org.Mentalis.Network.ProxySocket Namespace | ProxySocket Constructor Overload List