ConnectionServer constructor

ConnectionServer(
  1. List<Service> services, [
  2. List<Interceptor> interceptors = const <Interceptor>[],
  3. CodecRegistry? codecRegistry,
  4. GrpcErrorHandler? errorHandler,
  5. ServerKeepAliveOptions _keepAliveOptions = const ServerKeepAliveOptions(),
])

Create a server for the given services.

Implementation

ConnectionServer(
  List<Service> services, [
  List<Interceptor> interceptors = const <Interceptor>[],
  CodecRegistry? codecRegistry,
  GrpcErrorHandler? errorHandler,
  this._keepAliveOptions = const ServerKeepAliveOptions(),
])  : _codecRegistry = codecRegistry,
      _interceptors = interceptors,
      _errorHandler = errorHandler {
  for (final service in services) {
    _services[service.$name] = service;
  }
}