RSQueryContext
public struct RSQueryContext
Answers a query sent by the remote peer. Multiple messages may be sent in response to a query by
sending the initial responses with the isLastMessage
set to false
, and sending the terminal
response with the isLastMessage
parameter set to true
-
Sends a response to associated query
Declaration
Swift
public func respond(_ data: RSTaggedData, isLastMessage: Bool = true)
Parameters
data
RSTaggedData
to send to user who sent queryisLastMessage
indicates that this is the last message in a series of messages
-
Sends an error response to a query
Declaration
Swift
public func error(_ error: RSErrorResponse)
Parameters
error
RSErrorResponse
to be sent to user that sent query