Early Preview
This is currently very much a preview. Please feel free to try things out,
but don't be upset if anything is not yet working. Feedback is welcome over on our
GitHub Dicussions page.
class System.​Net.​SocketAddress
Assembly: System.Net.Primitives
Inheritance: object → SocketAddress
Implemented Interfaces
Stores serialized information from <see cref="T:System.Net.EndPoint" /> derived classes.
Properties
public
AddressFamily
Family
Gets the <see cref="T:System.Net.Sockets.AddressFamily" /> enumerated value of the current <see cref="T:System.Net.SocketAddress" /> .
public
byte
Item
public
int
Size
Gets the underlying buffer size of the <see cref="T:System.Net.SocketAddress" /> .
public
Memory<​byte>
Buffer
Gets the underlying memory that can be passed to native OS calls.
Methods
public static
int
GetMaximumAddressSize​(AddressFamily addressFamily)
Gets the maximum required buffer size for the given <see cref="T:System.Net.Sockets.AddressFamily" /> .
Returns The maximum buffer size.
addressFamily
The addressing scheme to use.
public
bool
Equals​(object comparand)
Determines whether the specified <see langword="Object" /> is equal to the current <see langword="Object" /> .
Returns <see langword="true" /> if the specified <see langword="Object" /> is equal to the current <see langword="Object" /> ; otherwise, <see langword="false" /> .
comparand
The <see cref="T:System.Object" /> to compare with the current <see langword="Object" /> .
public
bool
Equals​(SocketAddress comparand)
Indicates whether the current object is equal to another object of the same type.
Returns <see langword="true" /> if the current object is equal to the <paramref name="comparand" /> parameter; otherwise, <see langword="false" /> .
comparand
The object to compare.
public
int
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 <see cref="T:System.Object" /> .
public
string
ToString​()
Returns information about the socket address.
Returns A string that contains information about the <see cref="T:System.Net.SocketAddress" /> .
protected
void
Finalize​()
Inherited from object
protected
object
MemberwiseClone​()
Inherited from object