gRPC  0.6.0
 All Classes Namespaces Functions Variables Enumerations Properties Pages
Public Member Functions | Public Attributes | Properties | List of all members
Grpc.Core.Server Class Reference

A gRPC server. More...

Public Member Functions

void AddServiceDefinition (ServerServiceDefinition serviceDefinition)
 Adds a service definition to the server. This is how you register handlers for a service with the server. Only call this before Start(). More...
 
int AddListeningPort (string host, int port)
 Add a non-secure port on which server should listen. Only call this before Start(). More...
 
int AddListeningPort (string host, int port, ServerCredentials credentials)
 Add a non-secure port on which server should listen. Only call this before Start(). More...
 
void Start ()
 Starts the server. More...
 
async Task ShutdownAsync ()
 Requests server shutdown and when there are no more calls being serviced, cleans up used resources. The returned task finishes when shutdown procedure is complete. More...
 
void Kill ()
 

Public Attributes

const int PickUnusedPort = 0
 Pass this value as port to have the server choose an unused listening port for you. More...
 

Properties

Task ShutdownTask [get]
 To allow awaiting termination of the server. More...
 

Detailed Description

A gRPC server.

Member Function Documentation

int Grpc.Core.Server.AddListeningPort ( string  host,
int  port 
)
inline

Add a non-secure port on which server should listen. Only call this before Start().

Returns
The port on which server will be listening.
Parameters
hostthe host
portthe port. If zero, an unused port is chosen automatically.
int Grpc.Core.Server.AddListeningPort ( string  host,
int  port,
ServerCredentials  credentials 
)
inline

Add a non-secure port on which server should listen. Only call this before Start().

Returns
The port on which server will be listening.
Parameters
hostthe host
portthe port. If zero, , an unused port is chosen automatically.
void Grpc.Core.Server.AddServiceDefinition ( ServerServiceDefinition  serviceDefinition)
inline

Adds a service definition to the server. This is how you register handlers for a service with the server. Only call this before Start().

async Task Grpc.Core.Server.ShutdownAsync ( )
inline

Requests server shutdown and when there are no more calls being serviced, cleans up used resources. The returned task finishes when shutdown procedure is complete.

bool Server.Start ( )
inline

Starts the server.

Member Data Documentation

const int Grpc.Core.Server.PickUnusedPort = 0

Pass this value as port to have the server choose an unused listening port for you.

Property Documentation

Task Grpc.Core.Server.ShutdownTask
get

To allow awaiting termination of the server.


The documentation for this class was generated from the following files: