web_socket_channel_connect

Table of Contents

Introduction

A small wrapper for the web_socket_channel package that throws a synchronous error if the connection fails.

This addresses the following open issues on the web_socket_channel package:

Usage

import 'package:web_socket_channel_connect/web_socket_channel_connect.dart';

Future<void> main() async {
  final channel = connectWebSocket(Uri.parse('ws:localhost:5333'));

  channel.stream.listen((message) {});
}