ConnectionServer constructor

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

Create a server for the given services.

Implementation

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