Hi Joe, I recommend using the TwoPartyServer class, rather than EzRpcServer. The "EZ" classes are really only meant for the simplest of use cases; if you find you need to do something they don't support, then it's time to move on to the lower-level APIs.
-Kenton On Sun, May 12, 2019 at 11:52 AM Joe Ludwig <[email protected]> wrote: > I'm using EzRpcServer and EzRpcClient, and I'd like to do some cleanup on > the server when a client disconnects. > > Inside the implementation of EzRpcServer I see that it's getting a promise > when accepting a new client that appears to do some work on client > disconnect: That calls onDisconnect on the TwoPartyVatNetwork in the EZ > server's implementation: > // Arrange to destroy the server context when all references are > gone, or when the > // EzRpcServer is destroyed (which will destroy the TaskSet). > tasks.add(server->network.onDisconnect().attach(kj::mv(server))); > > > Is there any way to get this same promise through the EzRpcServer object > itself? Or some other way to know when a client has disconnected? > > > Joe > > -- > You received this message because you are subscribed to the Google Groups > "Cap'n Proto" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > Visit this group at https://groups.google.com/group/capnproto. > To view this discussion on the web visit > https://groups.google.com/d/msgid/capnproto/cd411d8f-4be8-405b-85bc-9b174133a879%40googlegroups.com > <https://groups.google.com/d/msgid/capnproto/cd411d8f-4be8-405b-85bc-9b174133a879%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "Cap'n Proto" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. Visit this group at https://groups.google.com/group/capnproto. To view this discussion on the web visit https://groups.google.com/d/msgid/capnproto/CAJouXQkF-8AY92ZF%2BQsvOYbaUKO377AYUYRUsA6GfaOC_dqFCw%40mail.gmail.com.
