An Agent is the representation of a client's Connection state on the
server. If the Connection was created through backend.connect (i.e. the
client is running in the same Node process as the server), then the Agent
associated with a Connection can be accessed through connection.agent.
The Agent will be made available in all middleware requests. The
agent.custom field is an object that can be used for storing arbitrary
information for use in middleware.
Object for custom use in middleware to store app-specific state for a
given client session. It is in memory only as long as the session is
active, and it is passed to each middleware call.
An
Agent
is the representation of a client'sConnection
state on the server. If theConnection
was created throughbackend.connect
(i.e. the client is running in the same Node process as the server), then theAgent
associated with aConnection
can be accessed throughconnection.agent
.The
Agent
will be made available in all middleware requests. Theagent.custom
field is an object that can be used for storing arbitrary information for use in middleware.See
https://github.com/share/sharedb#class-sharedbagent