mscorlib(4.0.0.0) API with additions
System.Net.SocketAddress Class Reference

Stores serialized information from T:System.Net.EndPoint derived classes. More...

Public Member Functions

 SocketAddress (AddressFamily family)
 Creates a new instance of the T:System.Net.SocketAddress class for the given address family. More...
 
 SocketAddress (AddressFamily family, int size)
 Creates a new instance of the T:System.Net.SocketAddress class using the specified address family and buffer size. More...
 
override bool Equals (object comparand)
 Determines whether the specified Object is equal to the current Object. More...
 
override int GetHashCode ()
 Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table. More...
 
override string ToString ()
 Returns information about the socket address. More...
 

Properties

AddressFamily Family [get]
 Gets the T:System.Net.Sockets.AddressFamily enumerated value of the current T:System.Net.SocketAddress. More...
 
int Size [get]
 Gets the underlying buffer size of the T:System.Net.SocketAddress. More...
 
byte this[int offset] [get, set]
 Gets or sets the specified index element in the underlying buffer. More...
 

Detailed Description

Stores serialized information from T:System.Net.EndPoint derived classes.

Definition at line 9 of file SocketAddress.cs.

Constructor & Destructor Documentation

◆ SocketAddress() [1/2]

System.Net.SocketAddress.SocketAddress ( AddressFamily  family)

Creates a new instance of the T:System.Net.SocketAddress class for the given address family.

Parameters
familyAn T:System.Net.Sockets.AddressFamily enumerated value.

Definition at line 85 of file SocketAddress.cs.

◆ SocketAddress() [2/2]

System.Net.SocketAddress.SocketAddress ( AddressFamily  family,
int  size 
)

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

Parameters
familyAn T:System.Net.Sockets.AddressFamily enumerated value.
sizeThe number of bytes to allocate for the underlying buffer.
Exceptions
T:System.ArgumentOutOfRangeExceptionsize is less than 2. These 2 bytes are needed to store family .

Definition at line 96 of file SocketAddress.cs.

Member Function Documentation

◆ Equals()

override bool System.Net.SocketAddress.Equals ( object  comparand)

Determines whether the specified Object is equal to the current Object.

Parameters
comparandThe T:System.Object to compare with the current Object.
Returns
true if the specified Object is equal to the current Object; otherwise, false.

Definition at line 196 of file SocketAddress.cs.

◆ GetHashCode()

override int System.Net.SocketAddress.GetHashCode ( )

Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.

Returns
A hash code for the current T:System.Object.

Definition at line 216 of file SocketAddress.cs.

◆ ToString()

override string System.Net.SocketAddress.ToString ( )

Returns information about the socket address.

Returns
A string that contains information about the T:System.Net.SocketAddress.

Definition at line 246 of file SocketAddress.cs.

Property Documentation

◆ Family

AddressFamily System.Net.SocketAddress.Family
get

Gets the T:System.Net.Sockets.AddressFamily enumerated value of the current T:System.Net.SocketAddress.

Returns
One of the T:System.Net.Sockets.AddressFamily enumerated values.

Definition at line 31 of file SocketAddress.cs.

◆ Size

int System.Net.SocketAddress.Size
get

Gets the underlying buffer size of the T:System.Net.SocketAddress.

Returns
The underlying buffer size of the T:System.Net.SocketAddress.

Definition at line 43 of file SocketAddress.cs.

◆ this[int offset]

byte System.Net.SocketAddress.this[int offset]
getset

Gets or sets the specified index element in the underlying buffer.

Parameters
offsetThe array index element of the desired information.
Returns
The value of the specified index element in the underlying buffer.
Exceptions
T:System.IndexOutOfRangeExceptionThe specified index does not exist in the buffer.

Definition at line 57 of file SocketAddress.cs.


The documentation for this class was generated from the following file: