You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+18-9Lines changed: 18 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -172,6 +172,8 @@ Register a new middleware.
172
172
*`stream`: The duplex Stream provided to `share.listen` (for 'connect')
173
173
*`query`: The query object being handled (for 'query')
174
174
*`snapshots`: Array of retrieved snapshots (for 'readSnapshots')
175
+
*`rejectSnapshotRead(snapshot, error)`: Reject a specific snapshot read (for 'readSnapshots')
176
+
-`rejectSnapshotReadSilent(snapshot, errorMessage)`: As above, but causes the ShareDB client to treat it as a silent rejection, not passing the error back to user code.
175
177
*`data`: Received client message (for 'receive')
176
178
*`request`: Client message being replied to (for 'reply')
177
179
*`reply`: Reply to be sent to the client (for 'reply')
@@ -601,21 +603,28 @@ An `Agent` is the representation of a client's `Connection` state on the server.
601
603
The `Agent` will be made available in all [middleware](#middlewares) requests. The `agent.custom` field is an object that can be used for storing arbitrary information for use in middleware. For example:
0 commit comments