pub repository
mirror.p-hatan.irmulti_server_socket
1.0.0A dart:io ServerSocket wrapper that listens on multiple ports.
This package is discontinued upstream.
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.0
- Initial release.
Installing
export PUB_HOSTED_URL=https://pub.mirror.p-hatan.ir
flutter pub add multi_server_socketpubspec.yaml
name: multi_server_socket
version: 1.0.0
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"
dev_dependencies:
test: "^0.12.0"
environment:
sdk: ">=1.13.0 <2.0.0"
Version history
| Version | Published | Archive | SHA-256 |
|---|---|---|---|
| 1.0.0 | 2017-12-01T23:38:35.216293Z | Download | 4dc5c8c9046a6abf1967ba168b7f8ec29619b88f35b14fcaef213e033f16e915 |
| 1.0.1 | 2018-01-03T01:22:19.587077Z | Download | 8a181addc7e3a6f9b8f069fd830e6777b01049e25113a1e6c86697b4df85138a |
| 1.0.2 | 2018-07-19T19:44:19.594475Z | Download | 30e317ebf812ca0f1a1022fe9b8ba6cf766de72ff31b65254a7d0a1ac7e5f037 |
Dependencies
async "^1.2.0"