ServerServerPortCollectionAdd Method (String, Int32, ServerCredentials) |
Adds a new port on which server should listen.
Return Value
Type:
Int32The port on which server will be listening.
Namespace: Grpc.CoreAssembly: Grpc.Core (in Grpc.Core.dll) Version: 0.7.0.0
Syntaxpublic int Add(
string host,
int port,
ServerCredentials credentials
)
Public Function Add (
host As String,
port As Integer,
credentials As ServerCredentials
) As Integer
public:
int Add(
String^ host,
int port,
ServerCredentials^ credentials
)
member Add :
host : string *
port : int *
credentials : ServerCredentials -> int
Parameters
- host
- Type: SystemString
the host - port
- Type: SystemInt32
the port. If zero, an unused port is chosen automatically. - credentials
- Type: Grpc.CoreServerCredentials
credentials to use to secure this port.
Return Value
Type:
Int32
See Also