Class KernelRpcBinaryCodec
Encodes server extension IR values as a small binary payload: one value-kind byte followed by only the active scalar or child sequence. The IPC layer transports the resulting bytes as an ordinary binary argument, avoiding reflection-bound DTO maps and repeated string kind tags on the wire.
public static class KernelRpcBinaryCodec
- Inheritance
-
KernelRpcBinaryCodec
- Inherited Members
Remarks
The encode side writes into an IBufferWriter<T> so the hot push path can supply a pooled
buffer and hand its written span straight to the transport. The byte[]-returning overloads stay for
server-extension callers and tests; they encode through a pooled writer and copy once at the boundary.
Methods
DecodeArguments(ReadOnlyMemory<byte>)
public static KernelRpcValue[] DecodeArguments(ReadOnlyMemory<byte> payload)
Parameters
payloadReadOnlyMemory<byte>
Returns
DecodeValue(ReadOnlyMemory<byte>)
public static KernelRpcValue DecodeValue(ReadOnlyMemory<byte> payload)
Parameters
payloadReadOnlyMemory<byte>
Returns
EncodeArguments(IReadOnlyList<KernelRpcValue>)
public static byte[] EncodeArguments(IReadOnlyList<KernelRpcValue> arguments)
Parameters
argumentsIReadOnlyList<KernelRpcValue>
Returns
- byte[]
EncodeArguments(IReadOnlyList<KernelRpcValue>, IBufferWriter<byte>)
Encodes arguments into writer without an intermediate array.
public static void EncodeArguments(IReadOnlyList<KernelRpcValue> arguments, IBufferWriter<byte> writer)
Parameters
argumentsIReadOnlyList<KernelRpcValue>writerIBufferWriter<byte>
EncodeValue(SandboxValue)
public static byte[] EncodeValue(SandboxValue value)
Parameters
valueSandboxValue
Returns
- byte[]
EncodeValue(SandboxValue, IBufferWriter<byte>)
Encodes value into writer without building a KernelRpcValue tree.
public static void EncodeValue(SandboxValue value, IBufferWriter<byte> writer)
Parameters
valueSandboxValuewriterIBufferWriter<byte>
EncodeValue(KernelRpcValue)
public static byte[] EncodeValue(KernelRpcValue value)
Parameters
valueKernelRpcValue
Returns
- byte[]
EncodeValue(KernelRpcValue, IBufferWriter<byte>)
Encodes value into writer without an intermediate array.
public static void EncodeValue(KernelRpcValue value, IBufferWriter<byte> writer)
Parameters
valueKernelRpcValuewriterIBufferWriter<byte>