multi_server_socket 1.0.2

  • Installing
  • Versions
  • 94

An implementation of dart:io's ServerSocket that wraps multiple servers and forwards methods to all of them. It's useful for listening on multiple network interfaces while still having a unified way of controlling the servers. In particular, it supports serving on both the IPv4 and IPv6 loopback addresses using MultiServerSocket.loopback.

import 'package:multi_server_socket/multi_server_socket.dart';

main() async {
  // Sockets connecting to either and http://[::1]:8080
  // will be emitted by [server].
  var server = await MultiServerSocket.loopback(8080);

  server.listen((socket) {
    // Communicate with [socket].


  • Set SDK version constraint to >=2.0.0-dev.54.0 <3.0.0.


  • Support package:async v2.


  • Initial release.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  multi_server_socket: ^1.0.2

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter packages get

Alternatively, your editor might support pub get or flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:multi_server_socket/multi_server_socket.dart';
Version Uploaded Documentation Archive
1.0.2 Jul 19, 2018 Go to the documentation of multi_server_socket 1.0.2 Download multi_server_socket 1.0.2 archive
1.0.1 Jan 3, 2018 Go to the documentation of multi_server_socket 1.0.1 Download multi_server_socket 1.0.1 archive
1.0.0 Dec 1, 2017 Go to the documentation of multi_server_socket 1.0.0 Download multi_server_socket 1.0.0 archive
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Dec 5, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.1.0
  • pana: 0.12.7


Detected platforms: Flutter, other

Primary library: package:multi_server_socket/multi_server_socket.dart with components: io.

Maintenance suggestions

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package. Common file name patterns include: main.dart, example.dart or you could also use multi_server_socket.dart.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.54.0 <3.0.0
async >=1.2.0 <3.0.0 2.0.8
Transitive dependencies
collection 1.14.11
Dev dependencies
test ^1.3.0