Skip to content

Home

Channels is a middleware-based communication library for building protocol-driven systems over TCP, UDP, and WebSockets. It is designed for scenarios where framing, parsing and business logic are implemented through composable middleware.

The concept behind this library is to apply a middleware pipeline to data flowing in and out of 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.

The following are projects that use or extend the functionality of this library.