Server module
This module contains all the server code for Node gRPC: both the Server
class itself and the method handler code for all types of methods.
For example, to create a Server, add a service, and start it:
var server = new server_module.Server();
server.addProtoService(protobuf_service_descriptor, service_implementation);
server.bind('address:port', server_credential);
server.start();
- Source:
Classes
Members
(static) Server
- Source:
- See:
Methods
(inner) getPeer() → {string}
Get the endpoint this call/stream is connected to.
- Source:
Returns:
The URI of the endpoint
- Type
- string
(inner) sendMetadata(responseMetadata)
Send the initial metadata for a writable stream.
Parameters:
Name | Type | Description |
---|---|---|
responseMetadata |
Metadata | Metadata to send |
- Source:
(inner) waitForCancel()
Wait for the client to close, then emit a cancelled event if the client
cancelled.
- Source: