Mercurial > hg > index.cgi
comparison docs/protocol.txt @ 5:422f5e8fff85
Extend base read timeout to 100ms in spec and implementation.
Reports indicate that 10ms is too short so extending the base timeout to
100ms to compensate.
author | William Astle <lost@l-w.ca> |
---|---|
date | Sun, 29 May 2016 21:59:29 -0600 |
parents | bef2801ac83e |
children | 2e382e1a173e |
comparison
equal
deleted
inserted
replaced
4:56f53e48ab50 | 5:422f5e8fff85 |
---|---|
61 wishes to use anything other than requests in the Base protocol (anyting in | 61 wishes to use anything other than requests in the Base protocol (anyting in |
62 the "Base Protocol" section below), it MUST initiate a feature negotiation | 62 the "Base Protocol" section below), it MUST initiate a feature negotiation |
63 request and it MUST NOT initiate any usage of the requested feature unless | 63 request and it MUST NOT initiate any usage of the requested feature unless |
64 it receives an ACK response from the server. | 64 it receives an ACK response from the server. |
65 | 65 |
66 If the delay between subsequent bytes in a request is greater 10 | 66 If the delay between subsequent bytes in a request is greater 100 |
67 milliseconds, the server MUST assume the transaction has failed and treat | 67 milliseconds, the server MUST assume the transaction has failed and treat |
68 it as an unknown transaction. The client MUST implement a similar timeout | 68 it as an unknown transaction. The client MUST implement a similar timeout |
69 to prevent entering into an infinite loop waiting for octets that may never | 69 to prevent entering into an infinite loop waiting for octets that may never |
70 come. The timeout on the client must be no longer than 1000 milliseconds and | 70 come. The timeout on the client must be no longer than 1000 milliseconds and |
71 should be no shorter than 10 milliseconds. These timeouts MUST be applied to | 71 should be no shorter than 100 milliseconds. These timeouts MUST be applied to |
72 ALL octets that are part of the communication stream. | 72 ALL octets that are part of the communication stream. |
73 | 73 |
74 Notwithstanding the above, some operations may specify a longer timeout | 74 Notwithstanding the above, some operations may specify a longer timeout |
75 which must be respected by that operation. | 75 which must be respected by that operation. |
76 | 76 |
303 | 303 |
304 The client will calculate a 16 bit checksum which is a simple sum of all | 304 The client will calculate a 16 bit checksum which is a simple sum of all |
305 bytes received. It will then send that checksum to the server. The server | 305 bytes received. It will then send that checksum to the server. The server |
306 must permit a longer timeout waiting for the checksum than is otherwise | 306 must permit a longer timeout waiting for the checksum than is otherwise |
307 expected to give the remote side long enough to actually calculate the | 307 expected to give the remote side long enough to actually calculate the |
308 checksum. It is recommended that the timeout here be at least 50ms. | 308 checksum. It is recommended that the timeout here be at least 200ms. |
309 | 309 |
310 Upon receipt of the checksum, the server will verify that it is correct. If | 310 Upon receipt of the checksum, the server will verify that it is correct. If |
311 there was an error reading the sector OR the checksum does not match, the | 311 there was an error reading the sector OR the checksum does not match, the |
312 server will return one of the error codes in the "Error Codes" section | 312 server will return one of the error codes in the "Error Codes" section |
313 below. Otherwise it will return a NUL byte. | 313 below. Otherwise it will return a NUL byte. |