0

I use nopoll (http://www.aspl.es/nopoll/) for my C application to communicate with Meteor.

Meteor send periodically some ping message. When my application poll websocket, it replies with pong message : everything is find.

Next, to avoid polling, I replace it by a callback initialized with sigaction(SIGIO, ...).

Then, when ping is received, I send pong, but sometimes, server stop sending ping and no other message could be exchanged.

Is there any timeout between ping and the associated pong message. Is there any mechanism to advertize myself of a connection loss, cause nopoll_conn_is_ok() and nopoll_conn_is ready() are always nopoll_true.

c.censier
  • 781
  • 7
  • 23

1 Answers1

1

It is difficult to say why Meteor is stopping sending content. However, two points are interesting to be considering your case:

  1. You don't have to send a PONG everytime you receive a PING when using noPoll because that's automatically done by noPoll's engine (see nopoll_conn_get_msg() implementation at nopoll_conn.c:2453). Maybe this is causing Meteor to fail.

  2. About getting a connection close notification, use nopoll_conn_set_on_close (conn,handler,ptr) to get a notification when the connection is closed. See working examples here: https://dolphin.aspl.es/svn/publico/nopoll/trunk/test/nopoll-regression-client.c

Best Regards,