Show / Hide Table of Contents

    Class Server.ServerPortCollection

    Collection of server ports.

    Inheritance
    System.Object
    Server.ServerPortCollection
    Implements
    System.Collections.Generic.IEnumerable<ServerPort>
    System.Collections.IEnumerable
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Grpc.Core
    Assembly: Grpc.Core.dll
    Syntax
    public class ServerPortCollection : IEnumerable<ServerPort>, IEnumerable

    Methods

    Add(ServerPort)

    Adds a new port on which server should listen. Only call this before Start(). The port on which server will be listening. Return value of zero means that binding the port has failed.

    Declaration
    public int Add(ServerPort serverPort)
    Parameters
    Type Name Description
    ServerPort serverPort
    Returns
    Type Description
    System.Int32

    Add(String, Int32, ServerCredentials)

    Adds a new port on which server should listen. The port on which server will be listening. Return value of zero means that binding the port has failed.

    Declaration
    public int Add(string host, int port, ServerCredentials credentials)
    Parameters
    Type Name Description
    System.String host

    the host

    System.Int32 port

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

    ServerCredentials credentials

    credentials to use to secure this port.

    Returns
    Type Description
    System.Int32

    GetEnumerator()

    Gets enumerator for this collection.

    Declaration
    public IEnumerator<ServerPort> GetEnumerator()
    Returns
    Type Description
    System.Collections.Generic.IEnumerator<ServerPort>

    Explicit Interface Implementations

    IEnumerable.GetEnumerator()

    Declaration
    IEnumerator IEnumerable.GetEnumerator()
    Returns
    Type Description
    System.Collections.IEnumerator

    Implements

    System.Collections.Generic.IEnumerable<T>
    System.Collections.IEnumerable
    Back to top Generated by DocFX