Clients - grpc : Caller

Provides the gRPC remote functions for interacting with caller.

Remote Methods

send

Sends outbound response to the caller.

complete

Informs the caller, server finished sending messages.

sendError

Sends server error to the caller.

Methods

Fields

  • remoteDetails Remote (default {})
  • The remote details

  • local Local (default {})
  • The local details

send

(anydata res, Headers? headers)

returns Error?

Sends outbound response to the caller.

Parameters

  • res anydata
    • The outbound response message.

  • headers Headers? (default ())
    • Optional headers parameter. Passes header value if needed. Default sets to nil.

  • Return Type

    (Error?)
    • Returns an error if encounters an error while sending the response, returns nil otherwise.

complete

()

returns Error?

Informs the caller, server finished sending messages.

  • Return Type

    (Error?)
  • Returns an error if encounters an error while sending the response, returns nil otherwise.

sendError

(int statusCode, string message, Headers? headers)

returns Error?

Sends server error to the caller.

Parameters

  • statusCode int
  • Error status code.

  • message string
  • Error message.

  • headers Headers? (default ())
  • Optional headers parameter. Passes header value if needed. Default sets to nil.

  • Return Type

    (Error?)
  • Returns an error if encounters an error while sending the response, returns nil otherwise.

getId

()

returns int

  • Return Type

    (int)

isCancelled

()

returns boolean

Checks whether the connection is closed by the caller.

  • Return Type

    (boolean)
  • Returns true, if caller already closed the connection. false otherwise.