Skip to main content

[jsr356-experts] Re: [jsr356-users] Pings and Pongs

  • From: Jitendra Kotamraju < >
  • To:
  • Subject: [jsr356-experts] Re: [jsr356-users] Pings and Pongs
  • Date: Fri, 13 Jul 2012 15:21:51 -0700

On 07/12/2012 04:24 PM, Danny Coward wrote:
" type="cite"> Hi folks,

My (re-)read of the web socket RFC sections on Pings and Pongs (http://tools.ietf.org/html/rfc6455#section-5.5.2) tells me that:

- applications should be able to send pings at will 'as a keepalive or to verify responsiveness'
- pings can have application data in them
- an active endpoint MUST send back a pong if it gets a ping as soon as possible
- the pong must have the same application data as the ping.

So it looks to me that for the JSR API, this means:-

a) API to send pings, something like: public void sendPing(byte[] applicationData) on RemoteEndpoint.
b) A ping-pong should reset the idle timeout on the connection.
c) API to receive pongs, something like: public void onPong(byte[] applicationData) on MessageListener
d) implementations should answer a ping with a pong with the same data as soon as possible after receiving it.

Any other thoughts ?
I wonder why _javascript_ client API doesn't provide any means to send ping messages. May be its of not much use to expose in the API as it would be handled at the infrastructure level using some ping/pong strategy.

Jitu
" type="cite">
- Danny

--
Danny Coward
Java EE
Oracle Corporation




[jsr356-experts] Pings and Pongs

Danny Coward 07/12/2012

[jsr356-experts] Re: Pings and Pongs

Joe Walnes 07/13/2012

[jsr356-experts] Re: Pings and Pongs

Greg Wilkins 07/13/2012

[jsr356-experts] Re: Pings and Pongs

Joe Walnes 07/13/2012

[jsr356-experts] Re: [jsr356-users] Pings and Pongs

Jitendra Kotamraju 07/13/2012
 
 
Close
loading
Please Confirm
Close