DriftServer constructor

DriftServer(
  1. QueryExecutor connection,
  2. {bool allowRemoteShutdown = false,
  3. bool closeConnectionAfterShutdown = true}
)

Creates a drift server proxying incoming requests to the underlying connection.

If allowRemoteShutdown is set to true (it defaults to false), clients can use shutdown to stop this server remotely. If closeConnectionAfterShutdown is set to true (the default), shutting down the server will also close the connection.

Implementation

factory DriftServer(QueryExecutor connection,
    {bool allowRemoteShutdown = false,
    bool closeConnectionAfterShutdown = true}) {
  return ServerImplementation(
      connection, allowRemoteShutdown, closeConnectionAfterShutdown);
}