# EndpointOptionsExtensions Methods

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.runtime/orleans.hosting.endpointoptionsextensions/)

## ConfigureEndpoints(ISiloBuilder, IPAddress, int, int, bool) {#configureendpoints-this-orleans-hosting-isilobuilder-system-net-ipaddress-int-in-bd6853b9}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.runtime/orleans.hosting.endpointoptionsextensions/methods/configureendpoints-this-orleans-hosting-isilobuilder-system-net-ipaddress-int-in-bd6853b9/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Runtime/Hosting/EndpointOptionsExtensions.cs#L31-L43)

```csharp
public static ISiloBuilder ConfigureEndpoints(this ISiloBuilder builder, IPAddress advertisedIP, int siloPort, int gatewayPort, bool listenOnAnyHostAddress = false)
```

Configure endpoints for the silo.

### Parameters

- `builder` (`ISiloBuilder`): The host builder to configure.
- `advertisedIP` (`IPAddress`): The IP address to be advertised in membership tables
- `siloPort` (`int`): 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.
- `listenOnAnyHostAddress` (`bool`): Set to true to listen on all IP addresses of the host instead of just the advertiseIP.

## ConfigureEndpoints(ISiloBuilder, int, int, AddressFamily, bool) {#configureendpoints-this-orleans-hosting-isilobuilder-int-int-system-net-sockets-2f13a883}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.runtime/orleans.hosting.endpointoptionsextensions/methods/configureendpoints-this-orleans-hosting-isilobuilder-int-int-system-net-sockets-2f13a883/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Runtime/Hosting/EndpointOptionsExtensions.cs#L90)

```csharp
public static ISiloBuilder ConfigureEndpoints(this ISiloBuilder builder, int siloPort, int gatewayPort, AddressFamily addressFamily = AddressFamily.InterNetwork, bool listenOnAnyHostAddress = false)
```

Configure endpoints for the silo.

### Parameters

- `builder` (`ISiloBuilder`): The host builder to configure.
- `siloPort` (`int`): 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.
- `addressFamily` (`AddressFamily`): 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.

## ConfigureEndpoints(ISiloBuilder, string, int, int, AddressFamily, bool) {#configureendpoints-this-orleans-hosting-isilobuilder-string-int-int-system-net-s-a92336b5}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.runtime/orleans.hosting.endpointoptionsextensions/methods/configureendpoints-this-orleans-hosting-isilobuilder-string-int-int-system-net-s-a92336b5/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Runtime/Hosting/EndpointOptionsExtensions.cs#L64-L71)

```csharp
public static ISiloBuilder ConfigureEndpoints(this ISiloBuilder builder, string hostname, int siloPort, int gatewayPort, AddressFamily addressFamily = AddressFamily.InterNetwork, bool listenOnAnyHostAddress = false)
```

Configure endpoints for the silo.

### Parameters

- `builder` (`ISiloBuilder`): The host builder to configure.
- `hostname` (`string`): The host name the silo is running on.
- `siloPort` (`int`): 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.
- `addressFamily` (`AddressFamily`): 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.
