Server is the server-side transport handle
| 20 | |
| 21 | // Server is the server-side transport handle |
| 22 | type Server interface { |
| 23 | // Serve serves a function `name` within an instance `instance`. |
| 24 | // `paths` define the async parameter paths to subscribe on. |
| 25 | // `Serve` will call `f` with two handles used for writing and reading encoded results and parameters respectively. |
| 26 | // On success, `Serve` returns a function, which can be called to stop serving. |
| 27 | Serve(instance string, name string, f HandleFunc, paths ...SubscribePath) (func() error, error) |
| 28 | } |
| 29 | |
| 30 | // Own is an owned resource handle |
| 31 | type Own[T any] []byte |