Pinging Mechanism

Another function of the SCM is to handle the pinging mechanism. It is easy for a client to know when a server is no longer available due to a crash. If a client tries to make a call to a server object that is no longer available through an interface proxy, the COM interceptor will generate an error. It is not so easy for the server to know if the client has crashed. The local SCM sends the remote SCM a ping every two minutes. The ping contains information about active clients. Each ping does not list all the clients in the machine, but rather the change in the number of clients from one ping to the next. If the server realizes that the client is no longer connected, it releases the outstanding references for that client. If the server misses three pings from the client, as in the case when the client’s machine has been disconnected from the network, the server will automatically release all the references from any clients from the missing machine. In other words, if a client crashes, six minutes later the server finds out and releases the client’s references to its objects. There is no way to change the ping interval or the number of pings that must be sent before the resources are reclaimed.

Get COM+ Programming with Visual Basic now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.