Documentation Index
Fetch the complete documentation index at: https://mintlify.com/FarlandsModdingTeam/TerbinProyect/llms.txt
Use this file to discover all available pages before exploring further.
InfoResponse is the standard return type for every [TerbinExecutable] handler and the primary way to send replies through TerbinCommunicator.Reply(). Rather than constructing a raw PacketRequest, handlers build an InfoResponse value using one of the static Create* factory methods. The communicator then serializes and routes it back to the original caller automatically.
Fields
The ID of the original
PacketRequest being replied to. Must match packet.Head.IdRequest so the awaiting Communicate() call can be resolved.The outcome status of the handler. Common values:
| Value | Meaning |
|---|---|
CodeStatus.Succes (200) | Operation completed successfully |
CodeStatus.IsCancelled (103) | Operation was cancelled |
CodeStatus.InternalWorkerError (500) | Unhandled error inside the handler |
CodeStatus.NotFound (404) | Requested resource does not exist |
CodeStatus.ActionNotFound (440) | No handler registered for the action |
The action routing key embedded in the response packet. Defaults to
new IdArray((byte)CodeTerbinProtocol.Response), which marks the packet as a reply rather than a new inbound request. You rarely need to change this manually when using the factory methods.The response data body. Empty (
[]) for status-only replies. Serialized domain objects, raw bytes, or error details go here.Static Factory Methods
All factory methods produce a fully initialisedInfoResponse value. Use them instead of the default constructor to ensure ActionMethod is set correctly.
Create — status only
The request ID to reply to.
The outcome status code.
Create — with payload
params byte[] payload.
The request ID to reply to.
The outcome status code.
The response payload bytes.
CreateSucces — no payload
CodeStatus.Succes response with an empty payload. The most common reply for void operations (install, delete, update) that simply need to signal completion.
The request ID to reply to.
CreateSucces — with payload
CodeStatus.Succes response carrying a data payload. Use this for read operations that return serialized objects.
The request ID to reply to.
The serialized response data.
CreateCancelled
CodeStatus.IsCancelled (103) response, indicating the operation was deliberately stopped before completing.
The request ID to reply to.
CreateInteralError
CodeStatus.InternalWorkerError (500) response. Pass serialized ExceptionDTO bytes as the payload to give the caller full exception context.
The request ID of the failed operation.
Error detail bytes — typically a serialized
ExceptionDTO.CreateResponseError (on PacketRequest)
PacketRequest also exposes a static error factory that mirrors this pattern at the packet level:
HandleSendFragment. For handler code, prefer InfoResponse.Create(id, errorStatus).
Typical Handler Pattern
The handler below shows the full lifecycle: receive a packet, process it, and return anInfoResponse.
Returning
null from an OnRecive handler suppresses the automatic call to Reply(). Do this when you have already manually called GiveResponse() to resolve the awaiting Communicate() call, or when the packet was a pure fire-and-forget notification that requires no acknowledgement.Default Constructor
| Field | Default |
|---|---|
IdRequest | TerbinProtocol.ORDER_SINGLE (0) |
Status | CodeStatus.NotAsign |
ActionMethod | new IdArray((byte)CodeTerbinProtocol.Response) |
Payload | [] |