new ServerDuplexStream(call, metadata, serialize, deserialize)
A stream that the server can read from or write to. Used for calls with duplex streaming.
Parameters:
Name | Type | Description |
---|---|---|
call |
grpc.internal~Call | Call object to proxy |
metadata |
grpc.Metadata | The request metadata from the client |
serialize |
grpc~serialize | Serialization function for requests |
deserialize |
grpc~deserialize | Deserialization function for responses |
Extends
Methods
-
getPeer()
-
Get the endpoint this call/stream is connected to.
Returns:
The URI of the endpoint
- Type
- string
-
sendMetadata(responseMetadata)
-
Send the initial metadata for a writable stream.
Parameters:
Name Type Description responseMetadata
grpc.Metadata Metadata to send
Events
-
cancelled
-
Emitted when the call has been cancelled. After this has been emitted, the call's
cancelled
property will be set totrue
.