3.5.1.1 Connection State Information

The following details about the state information define the context needed to manage a Polling connection. Unless otherwise noted, the following connection state variables are scoped to a single Polling Encapsulation connection. When a Polling virtual connection is terminated, this state information is no longer relevant and SHOULD be discarded.

A client SHOULD support multiple Polling connections to multiple servers concurrently. A client SHOULD support one Polling connection to the same target server (see ServerHost state information). In all cases, each Polling connection MUST maintain separate connection state variable information.

ServerPort: The well-known port number of the target server. By default this is the HTTP well known port 80/TCP.

ServerHost: The host name of the target server, in the form of an FQDN or IP Address. There is no default value.

PostSessionState: The variable used to maintain the current disposition of the POST session. There are six possible states: ‘Probing’, ‘Probed’, ‘Connecting’, ‘Connected’, ‘Established’, and ‘Closed’. The ‘Probing’ state indicates that the first Polling-POST-Request message of the Polling handshake has been sent. The ‘Probed’ state indicates that the first Polling-POST-Response message of the Polling handshake has been received. The 'Connecting' state indicates that the Polling-POST-Request with application data was sent on the Polling handshake. The 'Connected' state indicates that proxy negotiations are in progress. Non-proxy connections immediately transition through the 'Connected' state. The 'Established' state indicates that the POST session response was received. The ‘Closed’ state indicates that session cleanup is in progress.

ConnectionState: The variable used to maintain the current disposition of the

virtual Polling connection. There are three possible states: 'Connecting', 'Established', and 'Closed'. The 'Connecting' state indicates that POST session creation is in progress. The 'Established' state indicates that the POST sessions have been successfully created and application data MAY begin to flow over the virtual connection. The 'Closed' state indicates that the connection can no longer send or receive application data, and the virtual connection session MUST be closed.

ClientOKtoSend: The state variable that enforces the requirement that the client MUST NOT send application data if a Polling-POST-Request is outstanding. This state is set to FALSE each time a Polling-POST-Request is sent, and set to TRUE each time a Polling-POST-Response is received.

VirtualConnectionGUID: A GUID used to uniquely identify the virtual connection. This GUID is generated by the client when initiating the encapsulation connection. The GUID is exchanged between the client and server and MUST be unique within each server. There is no default value.

ProxyConnection: The indicator of whether the connection is a connection using a proxy or a direct connection to a server. The value is set to TRUE after the client determines that a proxy is to be used. The default value is FALSE.

RequestSequenceNum: The current sequence number of the request, as it appears on the wire. It is used to ensure sequencing of request messages. Its initial value starts at 0 and is incremented by 1 on each new request message. The sequence number SHOULD NOT repeat for the life of the virtual connection.

ResponseSequenceNum: The current sequence number of the response. It is used to ensure sequencing of response messages. Its initial value starts at 0 and is incremented by 1 for each new response message. The sequence number SHOULD NOT repeat for the life of the virtual connection.

The PollingMinRepetitionInterval, PollingMaxRepetitionInterval and PollingRepetitionCount values are used by Polling Encapsulation connections to determine the frequency of poll requests for Polling Encapsulation connections. They are sent by the server to the client on each response message.

PollingMinRepetitionInterval: The minimal amount of time in seconds to poll for data on an idle session. It is used by Polling Encapsulation connection logic to send the next polling POST command. The minimum value is used as the low water mark interval in the back off timer calculation (see section 3.5.2.3). The back off calculation is equal to two times the current interval. This value is sent by the server to the client on every POST response<38>.

PollingMaxRepetitionInterval: The maximum amount of time in seconds to poll for data on an idle session. It is used by the application to send the next polling POST command. The maximum value is used as the high water mark interval in the back off timer calculation (see section 3.5.2.3). This value is sent from the server to the client on every POST response<39>.

PollingRepetitionCount: The number of times a client is to poll the server at the current poll interval. It is used by Polling Encapsulation connection logic to keep track of the current poll repetition count. This current poll repetition count is initialized to 0 and incremented each time by 1, until it reaches the PollingRepetitionCount value at which point it recalculates (see section 3.5.2.3) the repetition interval based on the PollingMinRepetitionInterval and PollingMaxRepetitionInterval values. If no application data is received before this limit is reached, the back off algorithm recalculates the poll interval. This value is sent by the server to the client on every POST response<40>.