Name: multi_server_socket
Owner: Dart
Description: An implementation of dart:io's ServerSocket that wraps multiple servers and forwards methods to all of them
Created: 2017-12-01 21:15:00.0
Updated: 2018-05-03 01:37:46.0
Pushed: 2018-01-03 01:22:37.0
Homepage: https://pub.dartlang.org/packages/multi_server_socket
Size: 5
Language: Dart
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
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.
rt 'package:multi_server_socket/multi_server_socket.dart';
() async {
Sockets connecting to either http://127.0.0.1:8080 and http://[::1]:8080
will be emitted by [server].
r server = await MultiServerSocket.loopback(8080);
rver.listen((socket) {
// Communicate with [socket].
;