3.5.4.3.1 Sending Application Data without Proxy

The application data is included within a Polling-POST-Request.

The client MUST construct the Polling-POST-Request-URI as the Polling-POST-Request-Relative-URI.

The client MUST construct a Polling-POST-Request with required headers, as specified in section 2.2.4.1.

The client MUST construct the Polling-Virtual-Connection-Message as specified in section 2.2.4.1.3.1. This message is embedded within the Polling-Request-Entity-Body. The client MUST construct the Polling-Virtual-Connection-Message with the ServerHost as Relay-Server-Name, and VirtualConnectionGUID state variable as Virtual-Connection-GUID.

The first Polling-POST-Request after the Polling handshake MUST have a Sequence-Number of 1. Sequence-Number values MUST increase by 1 after each Polling-POST-Request sent. The last SequenceNumber sent SHOULD be stored in the RequestSequenceNum state variable and be incremented by 1 on every Polling-POST-Response sent.

The Polling-Virtual-Connection-Message Checksum field value MUST be calculated over the application data of each Polling-POST-Request message sent, as specified in section 2.2.4.1.3.1.2.

The application data, if present, is appended after the Polling-Virtual-Connection-Message; together they comprise the Polling-POST-Request-Entity-Body.

The client MUST construct a Polling-Content-Length header that is equal to the length of the

Polling-Virtual-Connection-Message plus the length of the application data. This content length MUST NOT exceed the 32768 octet limit imposed by the Polling protocol. The client opens one connection, a POST session, to the server as in sections 3.5.4.1.1 and 3.5.4.1.2, based on whether it has been given the proxy configuration information.

The NetworkReceiveIO timer SHOULD be restarted.

The client MUST establish a TCP connection to the server identified with ServerHost and ServerPort and send the Polling-POST-Request.

If there is no application data, the Polling timer MUST be restarted with the current polling interval.