Clients - grpc : StreamingClient

Provides the gRPC streaming client actions for interacting with the gRPC server.

Remote Methods

send Sends the request message to the server.
 grpc:Error? err = caller->send(message);
complete Informs the server when the caller has sent all the messages.
 grpc:Error? result = caller->complete();
sendError Sends an error message to the server.
 grpc:Error? result = streamingClient->sendError(grpc:ABORTED, "Operation aborted");

send

(anydata res)

returns Error?

Sends the request message to the server.

 grpc:Error? err = caller->send(message);

Parameters

  • res anydata
  • The inbound request message

  • Return Type

    (Error?)
  • A grpc:Error if an error occurs while sending the response or else ()

complete

()

returns Error?

Informs the server when the caller has sent all the messages.

 grpc:Error? result = caller->complete();

  • Return Type

    (Error?)
  • A grpc:Error if an error occurs while sending the response or else ()

sendError

(int statusCode, string message)

returns Error?

Sends an error message to the server.

 grpc:Error? result = streamingClient->sendError(grpc:ABORTED, "Operation aborted");

Parameters

  • statusCode int
  • Error status code

  • message string
  • Error message

  • Return Type

    (Error?)
  • A grpc:Error if an error occurs while sending the response or else ()