Clients - grpc : Caller

Provides the gRPC remote functions for interacting with caller.

Remote Methods

Methods

Fields

  • remoteDetails Remote {}
  • The remote details

  • local Local {}
  • The local details

send

(any res, Headers? headers)

returns Error?

Sends outbound response to the caller.

Parameters

  • res any
    • The outbound response message.

  • headers Headers? - ()
    • 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? - ()
  • 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.