IPEndPoint::Serialize Method ()
.NET Framework (current version)
Serializes endpoint information into a SocketAddress instance.
Assembly: System (in System.dll)
Return Value
Type: System.Net::SocketAddress^A SocketAddress instance containing the socket address for the endpoint.
The following example uses the Serialize method to serialize endpoint information into a SocketAddress instance.
// The serializeEndpoint function serializes the endpoint and returns the // SocketAddress containing the serialized endpoint data. SocketAddress^ serializeEndpoint( IPEndPoint^ endpoint ) { // Serialize IPEndPoint details to a SocketAddress instance. SocketAddress^ socketAddress = endpoint->Serialize(); // Display the serialized endpoint information. Console::WriteLine( "Endpoint.Serialize() : {0}", socketAddress ); Console::WriteLine( "Socket->Family : {0}", socketAddress->Family ); Console::WriteLine( "Socket->Size : {0}", socketAddress->Size ); Console::WriteLine( "Press any key to continue." ); Console::ReadLine(); return socketAddress; }
Universal Windows Platform
Available since 10
.NET Framework
Available since 1.1
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.1
Available since 10
.NET Framework
Available since 1.1
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.1
Show: