class RPCCodec
(source)
Encoder responsible for encoding requests.
This encoder is stateful as it maintains a counter to provide different request ids over time.
RPCCodec()
Encoder responsible for encoding requests. This encoder is stateful as it maintains a counter to provide different request ids over time. |
static fun encodeRequest(body: String, vararg flags: RPCFlag): Bytes static fun encodeRequest(body: Bytes, vararg flags: RPCFlag): Bytes static fun encodeRequest(body: Bytes, requestNumber: Int, vararg flags: RPCFlag): Bytes
Encode a message as a RPC request. static fun encodeRequest(body: Bytes, requestNumber: Int, flags: Byte): Bytes
Encode a message as an RPC request. |
|
static fun encodeResponse(body: Bytes, requestNumber: Int, flagByte: Byte): Bytes static fun encodeResponse(body: Bytes, requestNumber: Int, flagByte: Byte, vararg flags: RPCFlag): Bytes static fun encodeResponse(body: Bytes, requestNumber: Int, vararg flags: RPCFlag): Bytes
Encode a message as a response to a RPC request. |
|
static fun encodeStreamEndRequest(requestNumber: Int): Bytes
Encodes a message with the body and headers set in the appropriate way to end a stream. |