System.Net.SocketAddress Class

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

See Also: SocketAddress Members


public class SocketAddress


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.


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