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.

Reply via email to