SocketAddress Constructor (AddressFamily, Int32)

 

Creates a new instance of the SocketAddress class using the specified address family and buffer size.

Namespace:   System.Net
Assembly:  System (in System.dll)

public:
SocketAddress(
	AddressFamily family,
	int size
)

Parameters

family
Type: System.Net.Sockets::AddressFamily

An AddressFamily enumerated value.

size
Type: System::Int32

The number of bytes to allocate for the underlying buffer.

Exception Condition
ArgumentOutOfRangeException

size is less than 2. These 2 bytes are needed to store family.

Use this overload to create a new instance of the SocketAddress class with a particular underlying buffer size.

Universal Windows Platform
Available since 10
.NET Framework
Available since 1.1
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.1
Return to top
Show: