Class: ServerWritableStream

grpc~ ServerWritableStream


new ServerWritableStream(call, metadata, serialize)

A stream that the server can write to. Used for calls that are streaming from the server side.

Parameters:
Name Type Description
call grpc.internal~Call

The call object to send data with

metadata grpc.Metadata

The request metadata from the client

serialize grpc~serialize

Serialization function for writes

Extends

Members


cancelled :boolean

Indicates if the call has been cancelled

Type:
  • boolean

metadata :grpc.Metadata

The request metadata from the client

Type:

request :*

The request message from the client

Type:
  • *

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 to true.