Class LinksSessions
A store served to many sessions, each with its subject (issue #149): what a LinksServer gives every connection, without the network.
public sealed class LinksSessions
- Inheritance
-
LinksSessions
- Inherited Members
Remarks
Without Permissions every session sees and changes the whole store, exactly as before permissions existed. With them, a session sees the store through a PermissionsDecorator<TLinkAddress> of its subject, and every request is atomic: one that fails is undone whole, the writes the store made on its own (cascades, merges) and the names it took included, even where they touched links the subject cannot see.
(auth: token) sets the subject of the session to the one
Authenticate gives the token, and answers
(subject: i); an unknown token, or a server without an authenticator,
answers (error: 'Forbidden: authentication failed').
With Triplets every request is about triplets (TripletsOperation), and the permissions move above the triplets (TripletsPermissionsDecorator<TLinkAddress>): the wrappers and pairs that store a triplet are written straight to the store below, still inside the transaction of the request.
Constructors
LinksSessions(INamedTypesLinks<uint>, LinksServerOptions?)
public LinksSessions(INamedTypesLinks<uint> links, LinksServerOptions? options = null)
Parameters
linksINamedTypesLinks<uint>The store.
optionsLinksServerOptionsThe options of the server; only the permissions, authentication and references matter.
Properties
Links
The store.
public INamedTypesLinks<uint> Links { get; }
Property Value
Options
The options.
public LinksServerOptions Options { get; }
Property Value
Sessions
The sessions that are open.
public IReadOnlyList<LinksSession> Sessions { get; }
Property Value
Methods
Open(uint?)
Opens a session of subject, by default Subject.
public LinksSession Open(uint? subject = null)
Parameters
subjectuint?