3.1.5 Message Processing Events and Sequencing Rules
The states of the protocol, divided into the terminal server states and the terminal client states, are illustrated in the following figure.
Figure 13: State diagram for the terminal server and terminal client states
The states are described as follows:
Closed state: Both the terminal server sender and the terminal client receiver can be in the Closed state. The endpoint in a Closed state MUST NOT respond to any networking events, and MUST NOT generate or process any datagrams. The endpoint enters the Closed state when the Retransmit timer or the Keepalive timer is fired, as specified in section 3.1.5.4.
Listen state: Only the terminal server sender can enter this state. The terminal server listens on the port for incoming UDP connections, as specified in section 3.1.3.
SYN_SENT: Only the terminal client receiver can enter this state, after sending a SYN packet and thus initiating the connection.
SYN_RECEIVED: Only the terminal server sender can enter this state, after receiving a SYN packet from the terminal client receiver.
Established: This state indicates that a connection has been established, and datagrams are exchanged between the two endpoints.
Duplicate messages are ignored and discarded by either endpoint. The exchanged messages are specified in the following sections.