new ClientWritableStream(call, serializeopt)
A stream that the client can write to. Used for calls that are streaming from the client side.
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
call |
grpc.internal~Call | The call object to send data with |
||
serialize |
grpc~serialize |
<optional> |
identity | Serialization function for writes. |
- Source:
Extends
Methods
cancel()
Cancel the ongoing call. Results in the call ending with a CANCELLED status, unless it has already ended with some other status.
- Source:
getPeer() → {string}
Get the endpoint this call/stream is connected to.
- Source:
Returns:
The URI of the endpoint
- Type
- string
write(message, flags, callback) → {boolean}
Write a message to the request stream. If serializing the argument fails, the call will be cancelled and the stream will end with an error.
Parameters:
| Name | Type | Description |
|---|---|---|
message |
* | The message to write. Must be a valid argument to the serialize function of the corresponding method |
flags |
grpc.writeFlags | Flags to modify how the message is written |
callback |
function | Callback for when this chunk of data is flushed |
- Source:
Returns:
As defined for Writable
- Type
- boolean
Events
metadata
Initial response metadata sent by the server when it starts processing the call
Type:
- Source:
status
Status of the call when it has completed.
Type:
- Source: