+2008-06-10 Stephane Delcroix <sdelcroix@novell.com>
+
+ * DnsEndPoint_2_1.cs: embed an IPAddress and rely on IPEndPoint
+ for serialization.
+
2008-06-04 Stephane Delcroix <sdelcroix@novell.com>
* DnsEndPoint_2_1.cs: new DnsEndPoint class for SL2b1
string host;
int port;
Sockets.AddressFamily addressFamily = Sockets.AddressFamily.Unknown;
+ private IPAddress ipAddress;
public DnsEndPoint (string host, int port)
{
this.host = host;
this.port = port;
+
+ IPHostEntry host_entry = Dns.GetHostEntry (host);
+ ipAddress = host_entry.AddressList[0];
}
public DnsEndPoint (string host, int port, Sockets.AddressFamily addressFamily) : this (host, port)
get { return addressFamily; }
}
+ public override SocketAddress Serialize ()
+ {
+ return new IPEndPoint (ipAddress, port).Serialize ();
+ }
+
public string Host {
get { return host; }
}