Export (0) Print
Expand All

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.

ExceptionCondition
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.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Supported in: Windows Phone 8.1

Supported in: Windows Phone Silverlight 8.1

Supported in: Windows Phone Silverlight 8
Show:
© 2015 Microsoft