64 | | |
| 64 | == Detecting termination of a party |
| 65 | The partiesserver does not have a separate communication protocol to hear when parties have been terminated. Instead, the PartySocket (that the partiesserver provides for communication between the party and the server) is sniffed for characteristic termination events. The following events are considered indicative for termination: |
| 66 | 1. The socket breaks, eg because one of the parties closes it, some network failure, etc. |
| 67 | 2. The socket has reached its time-out. The time-out is initially set to 3 seconds which is assumed to be ample for setting up and configuring a party. When the socket detects a Settings object being sent to the party, it sets the time-out to settings.getProgress().getTerminationTime(). |
| 68 | 3. A "Finished" Inform object being sent to the party. |