event: client RPC protocol tweaks for domain lifecycle events
The counterpart to the server RPC additions; here, a single function can serve both old and new calls, while incoming events must be serviced by two different functions. Again, some wise choices in our XDR made it easier to share code managing similar events. While this only supports lifecycle events, it covers the harder part of how Register and RegisterAny interact; the remaining 15 events will be a mechanical change in a later patch. For Register, we now have a callbackID locally for more efficient cleanup if the RPC fails; we also prefer to use the newer RPC where we know it is supported (the older RPC must be used if we don't know if RegisterAny is supported). * src/remote/remote_driver.c (remoteEvents): Register new RPC event handler. (remoteDomainBuildEventLifecycle): Move guts... (remoteDomainBuildEventLifecycleHelper): ...here. (remoteDomainBuildEventCallbackLifecycle): New function. (remoteConnectDomainEventRegister) (remoteConnectDomainEventDeregister) (remoteConnectDomainEventRegisterAny) (remoteConnectDomainEventDeregisterAny): Use new RPC when supported.
Showing
想要评论请 注册 或 登录