System.Net.SocketAddress Class

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

See Also: SocketAddress Members

Syntax

public class SocketAddress

Remarks

The first 2 bytes of the underlying buffer are reserved for the System.Net.Sockets.AddressFamily enumerated value. When the System.Net.SocketAddress is used to store a serialized System.Net.IPEndPoint, the third and fourth bytes are used to store port number information. The next bytes are used to store the IP address. You can access any information within this underlying byte buffer by referring to its index position; the byte buffer uses zero-based indexing. You can also use the SocketAddress.Family and SocketAddress.Size properties to get the System.Net.Sockets.AddressFamily value and the buffer size, respectively. To view any of this information as a string, use the SocketAddress.ToString method.

Thread Safety

All public static members of this type are safe for multithreaded operations. No instance members are guaranteed to be thread safe.

Requirements

Namespace: System.Net
Assembly: System (in System.dll)
Assembly Versions: 1.0.x.x, 1.0.5000.0, 2.0.0.0, 4.0.0.0