TechNet
Export (0) Print
Expand All

RoleInstanceEndpoint.IPEndpoint Property

 

Gets an IPEndPoint object for the role instance endpoint. The IPEndPoint object provides the IP address and port number for the endpoint.

Namespace:   Microsoft.WindowsAzure.ServiceRuntime
Assembly:  Microsoft.WindowsAzure.ServiceRuntime (in Microsoft.WindowsAzure.ServiceRuntime.dll)

public abstract IPEndPoint IPEndpoint { get; internal set; }

Property Value

Type: System.Net.IPEndPoint

Type: System.Net.IPEndPoint

An instance of IPEndPoint.

The following code example shows how to retrieve the IPEndPoint objects for the running role instances:


foreach (var role in RoleEnvironment.Roles)
{
   foreach (var roleInst in role.Value.Instances)
   {
      foreach (RoleInstanceEndpoint instanceEndpoint in roleInst.InstanceEndpoints.Values)
      {
         Trace.WriteLine("Instance endpoint IP address and port:" + instanceEndpoint.IPEndpoint, "Information");
      }
   }
}
Return to top
Show:
© 2016 Microsoft