Search packages, repositories and app categories

Package detailsv3.0.0

shelf_web_socket

A shelf handler that wires up a listener for every connection.

AndroidiOSmacOSWindowsLinux
30-day downloads
13.2M
Likes
158
Pub points
160

Install package

flutter pub add shelf_web_socket

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

ShelfWebSocket is a Dart package that integrates WebSocket functionality into the Shelf web server framework. It provides a handler to manage WebSocket connections, enabling real-time communication between clients and servers. Each incoming connection triggers a listener, allowing developers to handle messages, broadcasts, and connection lifecycle events efficiently. Built for use with Shelf, it supports cross-platform deployment across Android, iOS, macOS, Windows, and Linux. Ideal for applications requiring live updates, chat systems, or real-time data synchronization.

Use cases

  • Real-time chat applications
  • Live data streaming
  • Interactive web dashboards
  • Multiplayer game backends
  • IoT device communication

Key features

  • Seamless integration with Shelf
  • Per-connection listener handling
  • Cross-platform support
  • Simple message broadcasting
  • Built-in connection lifecycle management

Suitable for

  • Developers using Shelf for backend services
  • Real-time application developers
  • Full-stack Dart developers
  • Server-side Dart projects
  • Web and mobile backend development

Considerations

  • Requires understanding of Shelf framework
  • Not suitable for standalone WebSocket servers
  • Limited to Dart-based server environments
  • May require additional security measures
  • Dependent on shelf package version compatibility

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

Build Status

About Shelf

Shelf makes it easy to create and compose web servers and parts of web servers. How?

  • Expose a small set of simple types.
  • Map server logic into a simple function: a single argument for the request, the response is the return value.
  • Trivially mix and match synchronous and asynchronous processing.
  • Flexibility to return a simple string or a byte stream with the same model.

It was inspired by Connect for NodeJS and Rack for Ruby.

See the package:shelf readme for more information.

Packages

Package Description Issues Version
shelf A model for web server middleware that encourages composition and easy reuse. issues pub package
shelf_packages_handler A shelf handler for serving a packages/ directory. issues pub package
shelf_proxy A shelf handler for proxying HTTP requests to another server. issues pub package
shelf_router A convenient request router for the shelf web-framework, with support for URL-parameters, nested routers and routers generated from source annotations. issues pub package
shelf_router_generator A package:build-compatible builder for generating request routers for the shelf web-framework based on source annotations. issues pub package
shelf_static Static file server support for the shelf package and ecosystem. issues pub package
shelf_test_handler A Shelf handler that makes it easy to test HTTP interactions. issues pub package
shelf_web_socket A shelf handler that wires up a listener for every connection. issues pub package
_shelf_compliance HTTP/1.1 compliance and hardening tests. issues (not published)

Publishing automation

For information about our publishing automation and release process, see https://github.com/dart-lang/ecosystem/wiki/Publishing-automation.

Categories

Dependencies

Dependency list 3 items

Source repository

Projects using this package

Rankings