Delen via


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)

Syntax

public abstract IPEndPoint IPEndpoint { get; internal set; }
public:
property IPEndPoint^ IPEndpoint {
    virtual IPEndPoint^ get() abstract;
    internal: virtual void set(IPEndPoint^ value) abstract;
}
abstract IPEndpoint : IPEndPoint with get, internal set
Public MustOverride Property IPEndpoint As IPEndPoint
    Get
    Friend Set
End Property

Property Value

Type: System.Net.IPEndPoint

Type: System.Net.IPEndPoint

An instance of IPEndPoint.

Remarks

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");
      }
   }
}

See Also

RoleEnvironment
RoleInstanceEndpoint Class
Microsoft.WindowsAzure.ServiceRuntime Namespace

Return to top