SocketAddress Constructor (AddressFamily, Int32)
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Creates a new instance of the SocketAddress class using the specified address family and buffer size.
Assembly: System.Net (in System.Net.dll)
Parameters
- family
- Type: System.Net.Sockets.AddressFamily
An AddressFamily enumerated value.
- size
- Type: System.Int32
The value to set for the Size property which affects 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 constructor to create a new instance of the SocketAddress class with a particular value for the Size property and the associated underlying buffer size. The Size property is less than the associated buffer size by a fixed amount.