Normally I would guess that the connection should be kept open but the
dojo client code expects the connectionId in the response of the
connect request. If not given the next messages (e.g. subscribe) will
pass a null value as connectionId.
So
- either the client code needs to be adopted
- or the server needs to return immediately
- or I have overseen the obvious and posted too early ;-)
Regards,
Markus
I think I have to adjust my terminology ;-) Let me rephrase the last
mail this time with XMLHttpRequest instead of connection.
With "long-polling" the XMLHttpRequest will be closed after a response
from the server. That still means that if I want to transfer the
connectionId as a result from the /meta/connect back to the client I
need to close the request immediately. After that a /meta/reconnect/
will happen and that XMLHttpRequest can be kept open for some time.
The question whether the server should return immediately or the
client should not expect to have the connectionId after sending a
/meta/connect still remains
After reading your mail I would assume that the server should send the
response immediately (and therefore close the request), as it is a
limitation of the long-polling transport that the response can't be
send without closing the request.
Is that true?
Regards,
Markus
Hi list,
I'm wondering whether a server is expected to keep the connection for a
/meta/connect request open in case of a long-polling request or if he
should immediately return.
hey chris, Thanks for the in depth information. There were some new information included for me. I think I have to adjust my terminology ;-) Let me rephrase the last mail this time with XMLHttpRequest instead of connection. With "long-polling" the XMLHttpRequest will be closed after a response from the server. That still means that if I want to transfer the connectionId as a result from the /meta/connect back to the client I need to close the request immediately. After that a /meta/reconnect/ will happen and that XMLHttpRequest can be kept open for some time. The question whether the server should return immediately or the client should not expect to have the connectionId after sending a /meta/connect still remains
After reading your mail I would assume that the server should send the response immediately (and therefore close the request), as it is a limitation of the long-polling transport that the response can't be send without closing the request. Is that true?
-ChrisRegards, Markus
Markus