7 Months Ago
RPC Filter (#1549) * Update documentation * Add recipient filter struct, type, and Rpc.FilterOnly and Rpc.AllExcept methods * Update documentation * Change filtertype options * Move to Connection.Filter. Can pass optional filter to Broadcast. Use this for Rpcs with current filter. * More docs * Same logic for static Rpcs * Add single Connection overloads * this can be made private * Fix ambigious docs * Inverse logic (doh!) * Use hasvalue etc * Some fixes * Remove duplicate docs * Better docs * RPC in log for consistency * Add overloads for filtering RPC recipients based on a predicate * FilterOnly -> FilterInclude. AllExcept -> FilterExclude. Only one RPC filter can be active at any time * Add Rpc.Resume. This handles disabling and restoring filter if the Rpc.Caller is us before and after resuming. Use this everywhere. * Restore the old filter here even if e.Resume() throws * Early out / cut nesting * Tidy up