3.6.5 Polling Server Message Processing Events and Sequencing Rules

Upon receiving data on the POST session, the server MUST first check to see if the data starts with an HTTP POST request line, as specified in section 2.2.4.1.1. If not then it is a protocol error, and the virtual Polling connection MUST be closed (see section 3.6.4.1).

The server MUST validate the Polling Polling-Virtual-Connection-Message by performing the following:

  1. The server extracts the version, server name, virtual connection GUID, sequence number, and checksum. If the parsing fails, it is a protocol error and the server MUST close the virtual Polling connection (see section 3.6.4.1).

  2. The server SHOULD<49> check the Polling-Encapsulation-Version and, if the version does not equal the required value (see section 2.2.4.1.3.1.1), close (see section 3.6.4.1) the virtual Polling connection.

  3. The server SHOULD<50> verify that the server name in the message equals its own name.

The server extracts the Virtual-Connection-GUID from the Polling-Virtual-Connection-Message. The server performs a lookup on the global VirtualConnectionGUIDList values to:

  1. Determine if the Virtual-Connection-GUID is a new connection or existing connection.

  2. Retrieve the ConnectionState and PostSessionState connection state variables for the existing connection.

A new Virtual-Connection-GUID event is handled as specified in section 3.6.5.1. Existing Virtual-Connection-GUIDs events whose ConnectionState is 'Connecting' are processed as specified in section 3.6.5.2. Existing Virtual-Connection-GUID event whose ConnectionState is 'Established' are processed as specified in section 3.6.5.3.