Class Server.ServerPortCollection

public class ServerPortCollection : IEnumerable<ServerPort>

Collection of server ports.

Inheritance

Object > Server.ServerPortCollection

Namespace

Grpc.Core

Assembly

Grpc.Core.dll

Methods

Add(ServerPort)

public int Add(ServerPort serverPort)

Adds a new port on which server should listen. Only call this before Start().

Parameter
TypeNameDescription
ServerPortserverPort
Returns
TypeDescription
Int32

Add(String, Int32, ServerCredentials)

public int Add(string host, int port, ServerCredentials credentials)

Adds a new port on which server should listen.

Parameters
TypeNameDescription
Stringhost

the host

Int32port

the port. If zero, an unused port is chosen automatically.

ServerCredentialscredentials

credentials to use to secure this port.

Returns
TypeDescription
Int32

GetEnumerator()

public IEnumerator<ServerPort> GetEnumerator()

Gets enumerator for this collection.

Returns
TypeDescription
IEnumerator<ServerPort>