Kevin Koch wrote: > Windows experts: how can my RPC server learn that a client has gone away? > The server needs to know because it may have state that needs to be cleaned > up. > > A) One method is for a server thread to send an RPC message to the client, > which the client never finishes processing. The server thread will get an > RPC exception when the client dies. > > B) Another method is for the server to hold the state until it has a reason > to talk to the client. Then it can notice that the client is not reachable. > > Is there any other way that has the benefits of method A (immediate > discovery, less resource consumption) without an outstanding RPC call for > each client? > > The server must be able to handle requests from all clients while > simultaneously detecting any client exiting. >
I/O Completion Ports is designed for this kind of thing. That's what you should be using if that's the goal. Danny _______________________________________________ kfwdev mailing list kfwdev@mit.edu http://mailman.mit.edu/mailman/listinfo/kfwdev