You can handle TChannel requests by specifying a handler to sub-channel register()
The TChannel argument schemes wrap handlers, taking responsibility for encoding and decoding arg2 and arg3.
Your handler will get called with an IncomingRequest and an
OutgoingResponse.
You will also receive arg2 and arg3 as buffers.
To send an ok response you can call sendOk() on the outgoing
response with two buffers for arg2 and arg3
To send an application error response you can call sendNotOk()
on the outgoing response with two buffers for arg2 and arg3
To send an error frame instead of a call response you can call
res.sendError().
Valid codeString values are: Timeout, Cancelled, Busy,
Declined, UnexpectedError, BadRequest, NetworkError,
UnHealthy, ProtocolError
For the samentics of the code string please read the protocol document
You can also pass an arbitrary string codeMessage that will
be in the error frame.