src/Orleans.Runtime/Hosting/EndpointOptionsExtensions.cs
/// <summary>
/// Configure endpoints for the silo.
/// </summary>
/// <param name="builder">The host builder to configure.</param>
/// <param name="hostname">The host name the silo is running on.</param>
/// <param name="siloPort">The port this silo uses for silo-to-silo communication.</param>
/// <param name="gatewayPort">The port this silo uses for client-to-silo (gateway) communication. Specify 0 to disable gateway functionality.</param>
/// <param name="addressFamily">Address family to listen on.  Default IPv4 address family.</param>
/// <param name="listenOnAnyHostAddress">Set to true to listen on all IP addresses of the host instead of just the advertiseIP.</param>
/// <returns></returns>
Configure endpoints for the silo.
Configure endpoints for the silo .
public static ISiloBuilder ConfigureEndpoints(
            this ISiloBuilder builder,
            string hostname,
            int siloPort,
            int gatewayPort,
            AddressFamily addressFamily = AddressFamily.InterNetwork,
            bool listenOnAnyHostAddress = false)
        {
            var ip = ConfigUtilities.ResolveIPAddressOrDefault(hostname, null, addressFamily);
            if (ip == null)
            {
                throw new ArgumentException("Hostname '" + hostname + "' with subnet [] and family " + addressFamily + " is not a valid IP address or DNS name");
            }            
            return builder.ConfigureEndpoints(ip, siloPort, gatewayPort, listenOnAnyHostAddress);
        }
public static ISiloBuilder ConfigureEndpoints ( this ISiloBuilder builder , string hostname , int siloPort , int gatewayPort , AddressFamily addressFamily = AddressFamily . InterNetwork , bool listenOnAnyHostAddress = false ) { var ip = ConfigUtilities . ResolveIPAddressOrDefault ( hostname , null , addressFamily ) ; if ( ip == null ) { throw new ArgumentException ( " " + hostname + " " + addressFamily + " " ) ; } return builder . ConfigureEndpoints ( ip , siloPort , gatewayPort , listenOnAnyHostAddress ) ; }
Configure endpoints for the silo.
Configure endpoints for the silo .
None
ISiloBuilder
this
hostname
string
The host name the silo is running on.
The host name the silo is running on .
siloPort
int
The port this silo uses for silo-to-silo communication.
The port this silo uses for silo - to - silo communication .
gatewayPort
int
The port this silo uses for client-to-silo (gateway) communication. Specify 0 to disable gateway functionality.
The port this silo uses for client - to - silo ( gateway ) communication . Specify 0 to disable gateway functionality .
addressFamily
AddressFamily
Address family to listen on.  Default IPv4 address family.
Address family to listen on . Default IPv4 address family .
listenOnAnyHostAddress
bool
Set to true to listen on all IP addresses of the host instead of just the advertiseIP.
Set to true to listen on all IP addresses of the host instead of just the advertiseIP .
builder
The host builder to configure.
The host builder to configure .