addAdapter method

void addAdapter(
  1. Adapter adapter
)

Adds a new Adapter to adapt incoming clients from a new interface.

Implementation

void addAdapter(Adapter adapter) {
  if (_started) {
    throw StateError(
        'You cannot add new adapters after the server has started listening.');
  } else {
    _adapters.add(adapter);
  }
}