# lemunozm/message-io

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/lemunozm-message-io).**

1,195 stars · 83 forks · Rust · Apache-2.0

## Links

- GitHub: https://github.com/lemunozm/message-io
- awesome-repositories: https://awesome-repositories.com/repository/lemunozm-message-io.md

## Topics

`actor-model` `actor-system` `asynchronous` `event-driven` `event-driven-architecture` `event-manager` `events` `message-driven` `message-queue` `multicast` `network` `network-programming` `non-blocking` `sockets` `tcp` `tcp-server` `transport` `udp` `udp-server` `websocket`

## Description

Message-io is an event-driven networking library written in Rust that provides a unified message-based API for building applications across multiple transport protocols. It allows developers to handle communication over TCP streams, UDP datagrams, and WebSocket connections through a single interface, while managing underlying network connections, message transport, and low-level socket asynchrony.

The library utilizes a single-threaded event loop architecture to process incoming connections, disconnections, network messages, and internal signals on a dedicated thread, eliminating traditional concurrency overhead and race conditions. It includes features for scheduling timed and prioritized signals using internal timers, streaming files in small chunks to prevent blocking the main event queue, and achieving zero-copy network I/O by reading and writing directly to operating system socket buffers.

Additional capabilities cover peer-to-peer communication through central server registration and local network discovery via multicast, alongside extensibility mechanisms that enable the integration of custom or proprietary transport protocols by implementing specific handler traits and adapters.

## Tags

### Networking & Communication

- [Client Connectivity Management](https://awesome-repositories.com/f/networking-communication/client-connectivity-management.md) — Establishes persistent network connections between multiple clients and a central server. ([source](https://github.com/lemunozm/message-io/blob/master/examples/ping-pong))
- [Event-Driven Networking](https://awesome-repositories.com/f/networking-communication/event-driven-networking.md) — Provides an event-driven networking architecture that manages connections and message transport using a single event loop.
- [Messaging APIs](https://awesome-repositories.com/f/networking-communication/messaging-apis.md) — Handles socket communication using an event-driven interface that exposes clean message endpoints. ([source](https://github.com/lemunozm/message-io#readme))
- [Multi-Protocol Transfer Libraries](https://awesome-repositories.com/f/networking-communication/multi-protocol-transfer-libraries.md) — Offers a unified interface for handling communication across TCP streams, UDP datagrams, and WebSocket connections.
- [Multi-Protocol Transport Abstraction](https://awesome-repositories.com/f/networking-communication/network-transport-protocols/multi-protocol-transport-abstraction.md) — Provides a unified message-based API for communicating across TCP, UDP, and WebSocket transport protocols. ([source](https://github.com/lemunozm/message-io#readme))
- [Socket Connection Establishment](https://awesome-repositories.com/f/networking-communication/socket-connection-establishment.md) — Establishes and manages multiple network socket connections while hiding low-level asynchrony. ([source](https://github.com/lemunozm/message-io/blob/master/docs/basic_concepts.md))
- [Custom Transport Protocols](https://awesome-repositories.com/f/networking-communication/custom-transport-protocols.md) — Enables the integration of proprietary or custom transport protocols by implementing specific handler traits. ([source](https://github.com/lemunozm/message-io/blob/master/README.md))
- [Zero-Copy Networking](https://awesome-repositories.com/f/networking-communication/zero-copy-networking.md) — Achieves zero-copy network I/O by reading and writing directly to operating system socket buffers. ([source](https://github.com/lemunozm/message-io/blob/master/README.md))

### Programming Languages & Runtimes

- [Event Loop Concurrency](https://awesome-repositories.com/f/programming-languages-runtimes/runtime-execution-environments/runtime-environments/runtime-internals-foundations/runtime-architecture/event-loop-concurrency.md) — Processes incoming connections and network messages within a single event loop to eliminate concurrency overhead. ([source](https://github.com/lemunozm/message-io#readme))
- [Rust Network Frameworks](https://awesome-repositories.com/f/programming-languages-runtimes/rust-network-frameworks.md) — Implements a high-performance network framework in Rust for building asynchronous applications over a message-based API.

### Software Engineering & Architecture

- [Single-Threaded Execution Models](https://awesome-repositories.com/f/software-engineering-architecture/single-threaded-execution-models.md) — Manages complex network traffic and internal timers on a single dedicated thread to avoid concurrency overhead.
- [Dedicated Network Threads](https://awesome-repositories.com/f/software-engineering-architecture/single-threaded-execution-models/single-threaded-event-bridging/dedicated-network-threads.md) — Processes all incoming connections and network messages on one dedicated thread to avoid concurrency issues. ([source](https://github.com/lemunozm/message-io/blob/master/README.md))

### Web Development

- [Multi-Protocol Networking Libraries](https://awesome-repositories.com/f/web-development/high-performance-http-servers/multi-protocol-networking-libraries.md) — Provides high-performance multi-protocol networking across TCP, UDP, and WebSockets.

### DevOps & Infrastructure

- [Timed Event Scheduling](https://awesome-repositories.com/f/devops-infrastructure/automation-orchestration/task-execution-frameworks/task-job-management/task-schedulers/delayed-task-scheduling/timed-event-scheduling.md) — Queues event processing using internal timers and priority levels to manage task execution order. ([source](https://github.com/lemunozm/message-io/blob/master/README.md))

### User Interface & Experience

- [Asynchronous Network Callbacks](https://awesome-repositories.com/f/user-interface-experience/event-handling/asynchronous-network-callbacks.md) — Receives asynchronous network events and internal signals through a unified callback mechanism. ([source](https://github.com/lemunozm/message-io/blob/master/docs/basic_concepts.md))
