tuweni / org.apache.tuweni.scuttlebutt.rpc / RPCCodec / encodeRequest

encodeRequest

static fun encodeRequest(body: String!, vararg flags: RPCFlag!): Bytes! (source)

Encode a message as a RPC request.

Parameters

body - String!: the body to encode as a RPC request

flags - RPCFlag!: the flags of the RPC request

Return
Bytes!: the message encoded as a RPC request

static fun encodeRequest(body: Bytes!, vararg flags: RPCFlag!): Bytes! (source)

Encode a message as a RPC request.

Parameters

body - Bytes!: the body to encode as a RPC request

flags - RPCFlag!: the flags of the RPC request

Return
Bytes!: the message encoded as a RPC request

static fun encodeRequest(body: Bytes!, requestNumber: Int, vararg flags: RPCFlag!): Bytes! (source)

Encode a message as a RPC request.

Parameters

body - Bytes!: the body to encode as a RPC request

requestNumber - Int: the number of the request. Must be equal or greater than one.

flags - RPCFlag!: the flags of the RPC request

Return
Bytes!: the message encoded as a RPC request

static fun encodeRequest(body: Bytes!, requestNumber: Int, flags: Byte): Bytes! (source)

Encode a message as an RPC request.

Parameters

body - Bytes!: the body to encode as an RPC request

requestNumber - Int: the request number

flags - Byte: the flags of the RPC request (already encoded.)

Return
Bytes!: the message encoded as an RPC request