![]() |
![]() |
![]() |
Wocky Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
void (*WockyHeartbeatCallback) (gpointer user_data
); GSource * wocky_heartbeat_source_new (guint max_interval
); void wocky_heartbeat_source_update_interval (GSource *source
,guint max_interval
);
GSource * wocky_heartbeat_source_new (guint max_interval
);
Creates a source which calls its callback at least every max_interval
seconds. This is similar to g_timeout_source_new_seconds()
, except that the
callback may be called slightly earlier than requested, in sync with other
periodic network activity (from other XMPP connections, or other
applications entirely).
When calling g_source_set_callback()
on this source, the supplied callback's
signature should match WockyHeartbeatCallback.
|
the maximum interval between calls to the source's callback, in seconds. Pass 0 to prevent the callback being called. |
Returns : |
the newly-created source. |
void wocky_heartbeat_source_update_interval (GSource *source
,guint max_interval
);
Updates the interval between calls to source
's callback. The new interval
may not take effect until after the next call to the callback.
|
a source returned by wocky_heartbeat_source_new()
|
|
the new maximum interval between calls to the source's callback, in seconds. Pass 0 to stop the callback being called. |