Skip to content

Implement wire protocol for byte-level message transmission between devices and the kernel #6

@sz-po

Description

@sz-po

The goal of this task is to establish a simple protocol at the byte transmission level.

Firstly, we need to define a message format. JSON messages should be used, which must contain the message type (in string format) and its content as a sequence of bytes.

Secondly, we need to create a mechanism that allows us to connect to io.Reader and attach handlers to it that can respond to a specific type of message. This mechanism should assume that each message is separated by a newline character.

Thirdly, we need to create a mechanism to connect to io.Writer, which provides an abstraction for sending messages. Each message must be separated by a newline character. Since JSON cannot be formatted, any newlines must be correctly converted using escape sequences.

It is important to include a description of the wire format in the readme file.

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentationfeatureNew feature or requestkernelThis issue is related to kernel.sdkThis issue is related to SDK.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions