Home
Channels is a transport-agnostic framework for building binary protocols over TCP, UDP, and WebSockets.
It provides an incremental middleware pipeline where raw transport data evolves into protocol-specific structures through composable adapters and handlers.
Channels itself is protocol-agnostic. Framing, parsing, serialization, and business semantics are implemented by adapters and handlers.
The concept behind this library is to apply a middleware pipeline to data flowing through communication channels.
For data coming through the channel input, two middleware components can be applied: adapters and handlers.
graph LR;
channelInput((Input)) --> a1[/Adapter/]
subgraph adapters
a1 --> a2[/Adapter/]
end
a2 --> h1[/Handler/]
a2 --> h2[/Handler/]
For data going through the channel output, only adapters are applicable. A built-in internal handler writes the resulting data to the underlying transport.
graph LR;
channelOutput((Output)) --> a1[/Adapter/]
subgraph adapters
a1 --> a2[/Adapter/]
end
a2 --> transport([Transport])
Learn more about middleware.