System.Net.Internals.SocketAddress.SocketAddress C# (CSharp) Method

SocketAddress() public method

public SocketAddress ( AddressFamily family, int size ) : System.Diagnostics
family AddressFamily
size int
return System.Diagnostics
        public SocketAddress(AddressFamily family, int size)
        {
            if (size < MinSize)
            {
                throw new ArgumentOutOfRangeException(nameof(size));
            }

            InternalSize = size;
            Buffer = new byte[(size / IntPtr.Size + 2) * IntPtr.Size];

            SocketAddressPal.SetAddressFamily(Buffer, family);
        }

Same methods

SocketAddress::SocketAddress ( AddressFamily family ) : System.Diagnostics
SocketAddress::SocketAddress ( IPAddress ipAddress ) : System.Diagnostics
SocketAddress::SocketAddress ( IPAddress ipaddress, int port ) : System.Diagnostics