p-hatan/ mirror

pub repository

mirror.p-hatan.ir

multi_server_socket

1.0.1

A dart:io ServerSocket wrapper that listens on multiple ports.

This package is discontinued upstream.

Download archive

Readme

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 http://127.0.0.1:8080 and http://[::1]:8080
  // will be emitted by [server].
  var server = await MultiServerSocket.loopback(8080);

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

1.0.1

  • Support package:async v2.

1.0.0

  • Initial release.

Installing

export PUB_HOSTED_URL=https://pub.mirror.p-hatan.ir
flutter pub add multi_server_socket
pubspec.yaml
name: multi_server_socket
version: 1.0.1
author: "Dart Team <misc@dartlang.org>"
homepage: http://github.com/dart-lang/multi_server_socket
description:
  A dart:io ServerSocket wrapper that listens on multiple ports.
dependencies:
  async: ">=1.2.0 <3.0.0"
dev_dependencies:
  test: "^0.12.0"
environment:
  sdk: ">=1.13.0 <2.0.0"

Version history

VersionPublishedArchiveSHA-256
1.0.02017-12-01T23:38:35.216293ZDownload4dc5c8c9046a6abf1967ba168b7f8ec29619b88f35b14fcaef213e033f16e915
1.0.12018-01-03T01:22:19.587077ZDownload8a181addc7e3a6f9b8f069fd830e6777b01049e25113a1e6c86697b4df85138a
1.0.22018-07-19T19:44:19.594475ZDownload30e317ebf812ca0f1a1022fe9b8ba6cf766de72ff31b65254a7d0a1ac7e5f037

Dependencies

async "\u003e=1.2.0 \u003c3.0.0"