MwsipcSession has a ptr<IMwsipcSessionHandler> in order to make callbacks into the caller
// Uniquely identifies a working set
$typedef+ Guid TWorkingSetId;
// MwsipcSession has a ptr in order to make callbacks into the caller
$interface+ IMwsipcSessionHandler : IObject
{
WorkingSetMachine* OnReceiveUnmatchedWorkingSetId(const TWorkingSetId& wsid);
void ReleaseWorkingSetMachine(WorkingSetMachine* wsm);
};
WorkingSetMachine* OnReceiveUnmatchedWorkingSetId(const TWorkingSetId& wsid)
Called when AddWorkingSet() has been called on the peer and a message has been received locally indicating that the peer wants to synchronise the working set with the given wsid.
Called without any locks on any CSpaces.
Return nullptr to reject synchronisation (in which case currently the connection is
aborted), otherwise return a WorkingSetMachine
to be added as a working set to be synchronised.
Note that the MwsipcSession does not take on responsibility for closing the returned
WorkingSetMachine
. For every WorkingSetMachine
that is returned by this function, there will
eventually be a call to ReleaseWorkingSetMachine to indicate when it is safe to close the
WorkingSetMachine
. Note that it is sufficient to close the working set machines after the
MultiplexedMsgConnection has been closed.
void ReleaseWorkingSetMachine(WorkingSetMachine* wsm)
Called when the MwsipcSession is no longer referencing the given WorkingSetMachine
making
it safe for it to be closed.
Called without any locks on any CSpaces. This makes it safe to close the WorkingSetMachine
from within the implementation of this function.