createSession static method

Session createSession(
  1. Request request
)

Creates a new session, assigns it a unique id and returns that session.

Implementation

static Session createSession(Request request) {
  final sessionId = _getSessionId(request);
  final result = Session._(
    id: sessionId,
  );
  _sessions[sessionId] = result;
  return result;
}