RoleInstanceEndpoint.Protocol Property
Gets the protocol that is defined for the endpoint.
Namespace: Microsoft.WindowsAzure.ServiceRuntime
Assembly: Microsoft.WindowsAzure.ServiceRuntime (in Microsoft.WindowsAzure.ServiceRuntime.dll)
public abstract string Protocol { get; internal set; }
public:
property String^ Protocol {
virtual String^ get() abstract;
internal: virtual void set(String^ value) abstract;
}
abstract Protocol : string with get, internal set
Public MustOverride Property Protocol As String
Get
Friend Set
End Property
Type: System.String
Type: System.String
A String that contains the protocol value that is defined for the endpoint.
Internal endpoints can have a protocol of http and tcp. External endpoints can have a protocol of http, https, and tcp. The endpoints that use the http and https protocols are preconfigured to listen by using http.sys while the endpoints that use the tcp protocol are not. The protocol of an endpoint is defined in the ServiceDefinition.csdef file. For more information about defining endpoints, see How to Define Internal Endpoints for a Role and How to Define Input Endpoints for a Role.
The following code example shows how to retrieve the defined protocol for the instance endpoints:
foreach (var role in RoleEnvironment.Roles)
{
foreach (var roleInst in role.Value.Instances)
{
foreach (RoleInstanceEndpoint instanceEndpoint in roleInst.InstanceEndpoints.Values)
{
Trace.WriteLine("Protocol for endpoint: " + instanceEndpoint.Protocol, "Information");
}
}
}
RoleEnvironment
RoleInstanceEndpoint Class
Microsoft.WindowsAzure.ServiceRuntime Namespace
Return to top