I really understood how this would work. In my example, the server saves the state space for both client A and client B. In the case when the server first receives a client message, the server receives a message with a state vector (0, 0), inserts F, and then updates its state vectors ( 1, 0) and (0, 1) for A and B, respectively (where the first number is the number of messages from the processed client, and the second is the number of messages from the server that were processed). Then the server sends "insert F to position 0" with the state vector (0, 0) (since it was the state of the server in state space B when the message was received by the server) and receives "insert G to position 0" from B sent with state (0, 0). Since the server is in state (0, 1) in the state space B, it first converts the message (and similarly, since B is in (1, 0), when it receives the server message, it also converts the message received from the server). Since the transforms must be configured so that if xform (c, s) = (c ', s'), then c 'is applied to s equal to s' applied to c, B, and the server falls into the same state. The same thing happens with the message received by the server from B, and then sent to A.
Saikat chakrabarti
source share