You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Animesh Sonkar <ak...@gmail.com> on 2010/03/15 15:30:21 UTC
Comet Request identification
Hi,
I create a comet connection using sockets and sending a post request.
To prevent the server from terminating the request (calling END event) i am
sending some heartbeat messages as chunked data on the same socket/request
connection.
Is there a way in comet to identify, that the heartbeat message came from an
existing connection/request.
So here is a case:
1. I send a post request over a socket with transfer-encoding chunked and
Connection:keep alive headers.
2. The CometProcessor receives a BEGIN and a READ event. I save the request
and response objects.
3. After some time i send a chunked data over the same socket to keep
request alive
4. The CometProcessor receives a READ event.
Now in step 4 : is it possible to recognize that the chunked data came for
the same connection.
My main problem is to identify that on a END event, which connnection got
terminated.
Thanks,
Animesh
Sorry about blabberring my thoughts..
AW: Comet Request identification
Posted by Steffen Heil <li...@steffen-heil.de>.
Hi
I am using a ConcurrentHashMap on event.getHttpServletRequest() and this
works quite well.
- I am not sure, if this is by occasion or by design though.
Regards,
Steffen
-----Ursprüngliche Nachricht-----
Von: Animesh Sonkar [mailto:aksonkar@gmail.com]
Gesendet: Montag, 15. März 2010 15:30
An: users@tomcat.apache.org
Betreff: Comet Request identification
Hi,
I create a comet connection using sockets and sending a post request.
To prevent the server from terminating the request (calling END event) i am
sending some heartbeat messages as chunked data on the same socket/request
connection.
Is there a way in comet to identify, that the heartbeat message came from an
existing connection/request.
So here is a case:
1. I send a post request over a socket with transfer-encoding chunked and
Connection:keep alive headers.
2. The CometProcessor receives a BEGIN and a READ event. I save the request
and response objects.
3. After some time i send a chunked data over the same socket to keep
request alive
4. The CometProcessor receives a READ event.
Now in step 4 : is it possible to recognize that the chunked data came for
the same connection.
My main problem is to identify that on a END event, which connnection got
terminated.
Thanks,
Animesh
Sorry about blabberring my thoughts..