IKVM11  11
Java SE 11 Virtual Machine for .NET
Loading...
Searching...
No Matches
InetSocketAddressExtensions.cs
Go to the documentation of this file.
1using System.Net;
2
4{
5
10 {
11
12#if FIRST_PASS == false
13
19 public static IPEndPoint ToIPEndpoint(this global::java.net.InetSocketAddress self)
20 {
21 if (self == null)
22 return null;
23 else
24 return new IPEndPoint(self.getAddress().ToIPAddress(), self.getPort());
25 }
26
32 public static global::java.net.InetSocketAddress ToInetSocketAddress(this IPEndPoint endpoint)
33 {
34 return endpoint != null ? new java.net.InetSocketAddress(endpoint.Address.ToInetAddress(endpoint.Address.ToString()), endpoint.Port) : null;
35 }
36
37#endif
38
39 }
40
41}
Extension methods for working with Internet Socket Addresses.
static global::java.net.InetSocketAddress ToInetSocketAddress(this IPEndPoint endpoint)
Gets a global::java.net.InetSocketAddress for the given IPEndPoint.
static IPEndPoint ToIPEndpoint(this global::java.net.InetSocketAddress self)
Gets a IPEndPoint for the given global::java.net.InetSocketAddress.