dart-lang/multi_server_socket

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

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

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.

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].
;


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.