Hi,
The Bayeux specification does not explicitly forbids them, but neither
defines them, so it was a real shot in the dark for the Faye Ruby
library to send them and expect that a Bayeux server would support
them.
To send a "ping"-like message is actually fairly easy by means of well
defined Bayeux messages: either a /meta/connect message, or a service
message.
The /meta/connect message ping would have this form:
{
"channel": "/meta/connect",
"timeout": 0,
...
}
The timeout=0 field tells the server to not hold the message, that
therefore is replied to immediately.
The service message ping would have this form:
{
"channel": "/service/ping",
...
}
The service channel used may be any service channel for which the
application knows it does not have any effect on the server.
Can be "/service/ping" or "/service/does_not_exist" or "/service/kdhiwf65", etc.
Being a service message it is replied to immediately by the server.
I would recommend that the Faye Ruby authors modify the library to
support either case - I have a preference for the service message
because it can be sent at any time, while the /meta/connect has
restrictions on when it can be sent.
--
Simone Bordet
----
http://cometd.org
http://webtide.com
Developer advice, training, services and support
from the Jetty & CometD experts.