Hi,
On Mon, Jul 1, 2019 at 11:17 AM Cosimo <
cosi...@streppone.it> wrote:
>
> Hi,
>
> I'm trying to understand what happens in a java cometd 4.0.3 server
> from when I call the ServerSession#deliver() method to when it's received
> on the client.
>
> It seems that some clients are receiving comet messages later than they should,
> so I'd like to understand what happens from deliver() onwards.
>
> The first step I want to do is to log the time elapsed from the deliver()
> call to when the successful promise callback is invoked, but what happens
> after that? Are messages put in a queue?
Yes.
> How can I log the timestamp
> when messages are sent on the network?
Implement ServerSession.DeQueueListener and add it as a listener to the session.
When this listener is invoked, the queue is drained and then sent -
it's the last chance to get an event before the messages are passed to
the transport to be sent over the network.
> On the client side (javascript), are there facilities to obtain a raw
> traffic log of the comet messages without having access to the
> webconsole?
You can monkey patch function CometD._debug() (or Window.console).
--
Simone Bordet
----
http://cometd.org
http://webtide.com
Developer advice, training, services and support
from the Jetty & CometD experts.